Update webpack and buid.sh

This commit is contained in:
weryques 2018-03-28 15:21:13 -03:00
parent 5cc4190f1b
commit 9af827e56b
4 changed files with 18 additions and 40 deletions

View File

@ -12,15 +12,15 @@ current_OS=`uname`
# For macOS (Darwin) # For macOS (Darwin)
if [ $current_OS == "Darwin" ]; then if [ $current_OS == "Darwin" ]; then
find src -type f \( -name "*.js" -or -name "*.vue" \) -exec md5 {} \; | sort -k 2 | md5 > last-js-build.md5 find src ./webpack.config.js -type f \( -name "*.js" -or -name "*.vue" -or -name "webpack.config.js" \) -exec md5 {} \; | sort -k 2 | md5 > last-js-build.md5
find src -type f \( -name "*.scss" \) -exec md5 {} \; | sort -k 2 | md5 > last-sass-build.md5 find ./src/scss/ ./src/admin/scss/ -type f \( -name "*.scss" \) -exec md5 {} \; | sort -k 2 | md5 > last-sass-build.md5
find src -type f \( -name "composer.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-composer-build.md5 find ./composer.json -type f \( -name "composer.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-composer-build.md5
find src -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-package-build.md5 find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-package-build.md5
else else
find src -type f \( -name "*.js" -or -name "*.vue" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-js-build.md5 find src ./webpack.config.js -type f \( -name "*.js" -or -name "*.vue" -or -name "webpack.config.js" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-js-build.md5
find src -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5 find ./src/scss/ ./src/admin/scss/ -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5
find src -type f \( -name "composer.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-composer-build.md5 find ./composer.json -type f \( -name "composer.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-composer-build.md5
find src -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5 find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5
fi fi
new_md5_package=$(<last-package-build.md5) new_md5_package=$(<last-package-build.md5)

24
package-lock.json generated
View File

@ -4309,11 +4309,6 @@
"readable-stream": "2.3.3" "readable-stream": "2.3.3"
} }
}, },
"fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"fs-extra": { "fs-extra": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz",
@ -7415,9 +7410,9 @@
} }
}, },
"mdi": { "mdi": {
"version": "2.1.99", "version": "2.2.43",
"resolved": "https://registry.npmjs.org/mdi/-/mdi-2.1.99.tgz", "resolved": "https://registry.npmjs.org/mdi/-/mdi-2.2.43.tgz",
"integrity": "sha512-s0NN21D+r6pOgU0UmrsbNs+lrdKG6xFq4BvJF6ivJlI5ki6KfWMO8kQsIpYxYiM177rad0cY3nOWVXotyyoyeg==" "integrity": "sha512-g3m6z4303qieltUM20JL2gdsJZvoVzIzO74qa2XxZ2kg9JPwrPEAgooVhRDHZi1vvRh0gB8Dg+c9XqNdz4jcIg=="
}, },
"media-typer": { "media-typer": {
"version": "0.3.0", "version": "0.3.0",
@ -7810,11 +7805,6 @@
"integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==", "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==",
"dev": true "dev": true
}, },
"net": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz",
"integrity": "sha1-0XV+yaf7I3HYPPR1XOPifhCCk4g="
},
"nice-try": { "nice-try": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",
@ -9969,7 +9959,8 @@
"qs": { "qs": {
"version": "6.5.1", "version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
"dev": true
}, },
"query-string": { "query-string": {
"version": "4.3.4", "version": "4.3.4",
@ -11666,11 +11657,6 @@
"setimmediate": "1.0.5" "setimmediate": "1.0.5"
} }
}, },
"tls": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/tls/-/tls-0.0.1.tgz",
"integrity": "sha1-CrK/WWjXHfL4wOFRXSSiJAuYqsg="
},
"tmp": { "tmp": {
"version": "0.0.31", "version": "0.0.31",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz",

View File

@ -4,22 +4,17 @@
"author": "Eduardo <eduardo.humberto1992@gmail.com>", "author": "Eduardo <eduardo.humberto1992@gmail.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development webpack --mode development --open --inline --hot",
"build": "cross-env NODE_ENV=production webpack --mode production --progress --hide-modules" "build": "cross-env NODE_ENV=production webpack --mode production --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"axios": "^0.18.0", "axios": "^0.18.0",
"buefy": "^0.6.3", "buefy": "^0.6.3",
"bulma": "^0.6.2", "bulma": "^0.6.2",
"fs": "0.0.1-security",
"html-to-json": "^0.6.0", "html-to-json": "^0.6.0",
"mdi": "^2.1.99", "mdi": "^2.1.99",
"moment": "^2.21.0", "moment": "^2.21.0",
"net": "^1.0.2",
"node-sass": "^4.7.2", "node-sass": "^4.7.2",
"qs": "^6.5.1",
"sass-loader": "^6.0.6", "sass-loader": "^6.0.6",
"tls": "0.0.1",
"vue": "^2.5.16", "vue": "^2.5.16",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vuedraggable": "^2.16.0", "vuedraggable": "^2.16.0",

View File

@ -12,7 +12,6 @@ module.exports = {
publicPath: './src/assets/', publicPath: './src/assets/',
filename: '[name]-components.js' filename: '[name]-components.js'
}, },
devtool: 'eval-source-map',
module: { module: {
rules: [ rules: [
{ {
@ -59,12 +58,10 @@ module.exports = {
'vue$': 'vue/dist/vue.esm.js' 'vue$': 'vue/dist/vue.esm.js'
} }
}, },
devServer: {
historyApiFallback: true,
noInfo: true
},
node: { node: {
fs: 'empty' fs: 'empty',
net: 'empty',
tls: 'empty'
}, },
performance: { performance: {
hints: false hints: false
@ -72,7 +69,7 @@ module.exports = {
}; };
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
module.exports.devtool = 'inline-source-map'; module.exports.devtool = ''; //'eval-source-map'; // Add it to use vue dev tools
// http://vue-loader.vuejs.org/en/workflow/production.html // http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([ module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({ new webpack.DefinePlugin({
@ -82,7 +79,7 @@ if (process.env.NODE_ENV === 'production') {
}), }),
new UglifyJsPlugin({ new UglifyJsPlugin({
parallel: true, parallel: true,
sourceMap: true, sourceMap: false, //Changes to true to use vue dev tools
}), }),
new webpack.LoaderOptionsPlugin({ new webpack.LoaderOptionsPlugin({
minimize: true minimize: true