delete init script

This commit is contained in:
jingsam 2016-10-28 18:50:34 +08:00
parent d6342fe1c3
commit 5a4a079b90
3 changed files with 4 additions and 9 deletions

View file

@ -5,7 +5,6 @@
var path = require('path'); var path = require('path');
var webpack = require('webpack'); var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = { module.exports = {
// 入口 // 入口
@ -63,10 +62,5 @@ module.exports = {
plugins: [ plugins: [
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
new HtmlWebpackPlugin({ // 构建html文件
filename: 'index.html',
template: './test/index.html',
inject: 'body'
})
] ]
}; };

View file

@ -15,8 +15,7 @@
], ],
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"init": "webpack --progress --config build/webpack.config.js", "dev": "webpack-dev-server --content-base test/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
"dev": "webpack-dev-server --content-base test/dist/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
"build": "gulp --gulpfile build/build-style.js" "build": "gulp --gulpfile build/build-style.js"
}, },
"repository": { "repository": {
@ -52,7 +51,6 @@
"gulp-minify-css": "^1.2.4", "gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"html-loader": "^0.3.0", "html-loader": "^0.3.0",
"html-webpack-plugin": "^2.22.0",
"less": "^2.7.1", "less": "^2.7.1",
"less-loader": "^2.2.3", "less-loader": "^2.2.3",
"style-loader": "^0.13.1", "style-loader": "^0.13.1",

View file

@ -3,8 +3,11 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>iView test page</title> <title>iView test page</title>
<link href="/test/dist/main.css" rel="stylesheet"></head>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="text/javascript" src="/test/dist/vendors.js"></script>
<script type="text/javascript" src="/test/dist/main.js"></script>
</body> </body>
</html> </html>