fix windows postinstall

This commit is contained in:
Matteo Pagliazzi
2019-10-24 14:06:20 +02:00
parent c3a8305a40
commit 04b18641ff
2 changed files with 6 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit --require ./tests/unit/helpers.js",
"lint": "vue-cli-service lint",
"postinstall": "if [ -n \"$npm_config_production\" ]; then npm run build; fi"
"postinstall": "node ./scripts/npm-postinstall.js"
},
"dependencies": {
"@vue/cli-plugin-babel": "^4.0.4",

View File

@@ -0,0 +1,5 @@
const { execSync } = require('child_process');
if (process.env.NODE_ENV === 'production') {
execSync('npm run build');
}