Fix extract script for dictionary files

On Windows, previous script didn't make sense.
This commit is contained in:
Yuya Ochiai
2017-04-27 23:52:11 +09:00
parent 11cab4cd3f
commit ed6a929f28
2 changed files with 5 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
},
"scripts": {
"postinstall": "install-app-deps && npm run extract-dict",
"extract-dict": "cd src/node_modules/simple-spellchecker/dict && node ../../../../scripts/7zip-cli.js e -y '*.zip'",
"extract-dict": "node scripts/extract_dict.js src/node_modules/simple-spellchecker/dict",
"build": "npm-run-all build:*",
"build:main": "cross-env NODE_ENV=production webpack --bail --config webpack.config.main.js",
"build:renderer": "cross-env NODE_ENV=production webpack --bail --config webpack.config.renderer.js",

View File

@@ -3,7 +3,10 @@
const {spawn} = require('child_process');
const {path7za} = require('7zip-bin');
spawn(path7za, process.argv.slice(2), {
const cwd = process.argv[2];
spawn(path7za, ['e', '-y', '*.zip'], {
cwd,
stdio: 'inherit'
}).on('error', (err) => {
console.error(err);