diff options
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r-- | gulpfile.babel.js | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 74b183a1d..ae7002eb2 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js | |||
@@ -143,25 +143,16 @@ export function dictionaries(done) { | |||
143 | let packages = ''; | 143 | let packages = ''; |
144 | Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); | 144 | Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); |
145 | 145 | ||
146 | if (process.platform !== 'win32') { | 146 | _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { |
147 | _shell(` | 147 | moveSync( |
148 | rm -rf ${paths.dictionaries} | 148 | path.join(__dirname, 'temp', 'node_modules'), |
149 | npm install --prefix ${path.join(__dirname, paths.dictionaries)} ${packages} | 149 | path.join(__dirname, 'build', paths.dictionaries), |
150 | mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries} | 150 | ); |
151 | rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json`, | 151 | |
152 | done); | 152 | removeSync(path.join(__dirname, 'temp')); |
153 | } else { | 153 | |
154 | _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => { | 154 | done(); |
155 | moveSync( | 155 | }); |
156 | path.join(__dirname, 'temp', 'node_modules'), | ||
157 | path.join(__dirname, 'build', paths.dictionaries) | ||
158 | ); | ||
159 | |||
160 | removeSync(path.join(__dirname, 'temp')); | ||
161 | |||
162 | done(); | ||
163 | }); | ||
164 | } | ||
165 | } | 156 | } |
166 | 157 | ||
167 | export function sign(done) { | 158 | export function sign(done) { |