Skip to content

Commit

Permalink
issue: build example
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Aug 14, 2017
1 parent e55f7f9 commit 19f1ef7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
10 changes: 9 additions & 1 deletion build/webpack.example.build.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const webpack = require('webpack');
module.exports = {
entry:'./example/index.js',
output:{
path: path.join(__dirname ,'../example'),
path: path.join(__dirname ,'../example/dist'),
filename: 'bundle.js'
},
module:{
Expand Down Expand Up @@ -39,5 +39,13 @@ module.exports = {
loader: 'url-loader?limit=8096&name=images/[name].[ext]'
}
]
},
resolve: {
extensions: [ '.js', '.scss'],
alias: {
node_modules: path.join(__dirname, '../node_modules'),
src: path.join(__dirname, '../src'),
example: path.join(__dirname, '../example')
}
}
};
2 changes: 1 addition & 1 deletion build/webpack.example.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const webpack = require('webpack');
module.exports = {
entry:'./example/index.js',
output:{
path: path.join(__dirname ,'./dist'),
path: path.join(__dirname ,'./example/dist'),
filename: 'bundle.js'
},
module:{
Expand Down
1 change: 0 additions & 1 deletion dist/preact-weui.js

This file was deleted.

6 changes: 0 additions & 6 deletions example/bundle.js

This file was deleted.

11 changes: 11 additions & 0 deletions example/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</head>
<body>
<main id="app"></main>
<script src="/bundle.js"></script>
<script src="./dist/bundle.js"></script>
</body>
</html>
4 changes: 0 additions & 4 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {h, render} from 'preact';

//styles:
import './styles/example.scss';

// pages:
import Button from './components/button/index';
import Home from './components/home/index';
Expand All @@ -29,7 +26,6 @@ import FormPreview from './components/form-preview/index';
import Layers from './components/layers/index';

// routes:
import { Link } from 'preact-router/match';
import Router from 'preact-router';

render(
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Gallery from './gallery/index';
import Grid from './grid/index';
import Icon from './icon/index';
import Input from './input/index';
import Loadmore from './loadmore/index';
import LoadMore from './loadmore/index';
import Mask from './mask/index';
import MediaBox from './media-box/media-box';
import MediaBoxHeader from './media-box/header';
Expand Down Expand Up @@ -105,7 +105,7 @@ export {
//input
Input,
//loadmore
Loadmore,
LoadMore,
//mask
Mask,
//media-box
Expand Down

0 comments on commit 19f1ef7

Please sign in to comment.