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)
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 -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 src -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-package-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/scss/ ./src/admin/scss/ -type f \( -name "*.scss" \) -exec md5 {} \; | sort -k 2 | md5 > last-sass-build.md5
find ./composer.json -type f \( -name "composer.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-composer-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
find src -type f \( -name "*.js" -or -name "*.vue" \) -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 -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 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/scss/ ./src/admin/scss/ -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5
find ./composer.json -type f \( -name "composer.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-composer-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
new_md5_package=$(<last-package-build.md5)

24
package-lock.json generated
View File

@ -4309,11 +4309,6 @@
"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": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz",
@ -7415,9 +7410,9 @@
}
},
"mdi": {
"version": "2.1.99",
"resolved": "https://registry.npmjs.org/mdi/-/mdi-2.1.99.tgz",
"integrity": "sha512-s0NN21D+r6pOgU0UmrsbNs+lrdKG6xFq4BvJF6ivJlI5ki6KfWMO8kQsIpYxYiM177rad0cY3nOWVXotyyoyeg=="
"version": "2.2.43",
"resolved": "https://registry.npmjs.org/mdi/-/mdi-2.2.43.tgz",
"integrity": "sha512-g3m6z4303qieltUM20JL2gdsJZvoVzIzO74qa2XxZ2kg9JPwrPEAgooVhRDHZi1vvRh0gB8Dg+c9XqNdz4jcIg=="
},
"media-typer": {
"version": "0.3.0",
@ -7810,11 +7805,6 @@
"integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==",
"dev": true
},
"net": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz",
"integrity": "sha1-0XV+yaf7I3HYPPR1XOPifhCCk4g="
},
"nice-try": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",
@ -9969,7 +9959,8 @@
"qs": {
"version": "6.5.1",
"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": {
"version": "4.3.4",
@ -11666,11 +11657,6 @@
"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": {
"version": "0.0.31",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz",

View File

@ -4,22 +4,17 @@
"author": "Eduardo <eduardo.humberto1992@gmail.com>",
"private": true,
"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"
},
"dependencies": {
"axios": "^0.18.0",
"buefy": "^0.6.3",
"bulma": "^0.6.2",
"fs": "0.0.1-security",
"html-to-json": "^0.6.0",
"mdi": "^2.1.99",
"moment": "^2.21.0",
"net": "^1.0.2",
"node-sass": "^4.7.2",
"qs": "^6.5.1",
"sass-loader": "^6.0.6",
"tls": "0.0.1",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
"vuedraggable": "^2.16.0",

View File

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