aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-12 11:10:37 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-12 11:10:37 +0100
commit73308038ab9fd2e04973b45a0ed250a42bb543ad (patch)
tree0318fdc2f2a323efdda99e8f394875930b7a2b0d /gulpfile.babel.js
parentImprove loader themeing (diff)
downloadferdium-app-73308038ab9fd2e04973b45a0ed250a42bb543ad.tar.gz
ferdium-app-73308038ab9fd2e04973b45a0ed250a42bb543ad.tar.zst
ferdium-app-73308038ab9fd2e04973b45a0ed250a42bb543ad.zip
Simplify dictionary step
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r--gulpfile.babel.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index 2ab3f47b1..e732f991a 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -25,6 +25,7 @@ const paths = {
25 src: 'src', 25 src: 'src',
26 dest: 'build', 26 dest: 'build',
27 tmp: '.tmp', 27 tmp: '.tmp',
28 dictionaries: 'build/dictionaries',
28 package: `out/${config.version}`, 29 package: `out/${config.version}`,
29 html: { 30 html: {
30 src: 'src/**/*.html', 31 src: 'src/**/*.html',
@@ -132,13 +133,30 @@ export function webserver() {
132 })); 133 }));
133} 134}
134 135
136export function dictionaries(done) {
137 const { SPELLCHECKER_LOCALES } = require('./build/i18n/languages');
138
139 let packages = '';
140 Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { packages = `${packages} hunspell-dict-${key}`; });
141
142 _shell(`
143 rm -rf ${paths.dictionaries}
144 npm install --prefix ${paths.dictionaries} ${packages}
145 mv ${paths.dictionaries}/node_modules/* ${paths.dictionaries}
146 rm -rf ${paths.dictionaries}/node_modules ${paths.dictionaries}/package-lock.json`,
147 done,
148 );
149}
150
135export function sign(done) { 151export function sign(done) {
136 _shell(`codesign --verbose=4 --deep --strict --force --sign "${process.env.SIGNING_IDENTITY}" "${__dirname}/node_modules/electron/dist/Electron.app"`, done); 152 _shell(`codesign --verbose=4 --deep --strict --force --sign "${process.env.SIGNING_IDENTITY}" "${__dirname}/node_modules/electron/dist/Electron.app"`, done);
137} 153}
138 154
139const build = gulp.series( 155const build = gulp.series(
156 clean,
140 gulp.parallel(mvSrc, mvPackageJson), 157 gulp.parallel(mvSrc, mvPackageJson),
141 gulp.parallel(html, scripts, styles), 158 gulp.parallel(html, scripts, styles),
159 dictionaries,
142); 160);
143export { build }; 161export { build };
144 162