aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-13 19:59:46 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-13 19:59:46 +0100
commitd5dadc116d18c49cb78da7d892c95b0c34df2c96 (patch)
tree6548b53c6851d6125f4d38629d940350275028b3 /gulpfile.babel.js
parentFix windows dictionary install (diff)
downloadferdium-app-d5dadc116d18c49cb78da7d892c95b0c34df2c96.tar.gz
ferdium-app-d5dadc116d18c49cb78da7d892c95b0c34df2c96.tar.zst
ferdium-app-d5dadc116d18c49cb78da7d892c95b0c34df2c96.zip
make dictionary download platform independent
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r--gulpfile.babel.js29
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
167export function sign(done) { 158export function sign(done) {