Skip to content

Commit

Permalink
删除dist使用cleanWebpack插件,fix some style
Browse files Browse the repository at this point in the history
  • Loading branch information
BUPT-HJM committed Apr 18, 2017
1 parent 3c8f866 commit ec8050f
Show file tree
Hide file tree
Showing 6 changed files with 1,070 additions and 1,028 deletions.
8 changes: 1 addition & 7 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
"libraryName": "element-ui",
"styleLibraryName": "theme-default"
}
]]],
"comments": false,
"env": {
"test": {
"plugins": [ "istanbul" ]
}
}
]]]
}
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/modules/front/components/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default {
font-size 20px
text-align center
span
color $dark-blue
color $blue
&__loading
position fixed
top 50%
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "npm run clean && nodemon server/start.js",
"clean": "rimraf client/dist",
"build:prod:json": "export NODE_ENV=production && npm run clean && webpack --config webpack.config.js --colors --profile --display-modules --sort-modules-by size --json > stats.json",
"build:prod:detail": "export NODE_ENV=production && npm run clean && webpack --config webpack.config.js --colors --profile --display-modules --sort-modules-by size",
"build:prod": "export NODE_ENV=production && npm run clean && webpack --config webpack.config.js --colors --profile --progress",
"start": "nodemon server/start.js",
"build:prod:json": "export NODE_ENV=production && webpack --config webpack.config.js --colors --profile --display-modules --sort-modules-by size --json > stats.json",
"build:prod:detail": "export NODE_ENV=production && webpack --config webpack.config.js --colors --profile --display-modules --sort-modules-by size",
"build:prod": "export NODE_ENV=production && webpack --config webpack.config.js --colors --profile --progress",
"start:prod": "NODE_ENV=production node server/start.js",
"prod": "npm run build:prod && npm run start:prod"
},
Expand Down Expand Up @@ -44,6 +43,7 @@
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-stage-0": "^6.22.0",
"clean-webpack-plugin": "^0.1.16",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
Expand Down
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const SERVER_FOLDER = resolve(__dirname, 'server');
const productionEnv = process.env.NODE_ENV === 'production' ? true : false;
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');

let config = {
devtool: '#cheap-module-eval-source-map',
Expand All @@ -29,6 +30,9 @@ let config = {
'simplemde': 'SimpleMDE'
},
plugins: [
new CleanWebpackPlugin([
CLIENT_FOLDER + '/dist',
]),
new webpack.HotModuleReplacementPlugin(),
// 开启全局的模块热替换(HMR)

Expand Down Expand Up @@ -172,7 +176,7 @@ if (process.env.NODE_ENV === 'production') {
fallback: 'vue-style-loader'
}),
}
config.plugins.splice(0, 2);
config.plugins.splice(1, 2);
config.plugins = config.plugins.concat([
new webpack.optimize.UglifyJsPlugin({
// 最紧凑的输出
Expand Down Expand Up @@ -233,6 +237,4 @@ if (process.env.NODE_ENV === 'production') {
]);
}



module.exports = config;
Loading

0 comments on commit ec8050f

Please sign in to comment.