aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r--gulpfile.babel.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index fc2820fed..ae7002eb2 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -6,9 +6,10 @@ import server from 'gulp-server-livereload';
6import { exec } from 'child_process'; 6import { exec } from 'child_process';
7import dotenv from 'dotenv'; 7import dotenv from 'dotenv';
8import sassVariables from 'gulp-sass-variables'; 8import sassVariables from 'gulp-sass-variables';
9import { removeSync } from 'fs-extra'; 9import { moveSync, removeSync } from 'fs-extra';
10import kebabCase from 'kebab-case'; 10import kebabCase from 'kebab-case';
11import hexRgb from 'hex-rgb'; 11import hexRgb from 'hex-rgb';
12import path from 'path';
12 13
13import config from './package.json'; 14import config from './package.json';
14 15
@@ -45,6 +46,7 @@ const paths = {
45}; 46};
46 47
47function _shell(cmd, cb) { 48function _shell(cmd, cb) {
49 console.log('executing', cmd);
48 exec(cmd, { 50 exec(cmd, {
49 cwd: paths.dest, 51 cwd: paths.dest,
50 }, (error, stdout, stderr) => { 52 }, (error, stdout, stderr) => {
@@ -141,13 +143,16 @@ export function dictionaries(done) {
141 let packages = ''; 143 let packages = '';
142 Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; }); 144 Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; });
143 145
144 _shell(` 146 _shell(`npm install --prefix ${path.join(__dirname, 'temp')} ${packages}`, () => {
145 rm -rf ${paths.dictionaries} 147 moveSync(
146 npm install --prefix ${paths.dictionaries} ${packages} 148 path.join(__dirname, 'temp', 'node_modules'),
147 mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries} 149 path.join(__dirname, 'build', paths.dictionaries),
148 rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json 150 );
149 pwd`, 151
150 done); 152 removeSync(path.join(__dirname, 'temp'));
153
154 done();
155 });
151} 156}
152 157
153export function sign(done) { 158export function sign(done) {