diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-12 11:10:37 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-12 11:10:37 +0100 |
commit | 73308038ab9fd2e04973b45a0ed250a42bb543ad (patch) | |
tree | 0318fdc2f2a323efdda99e8f394875930b7a2b0d /gulpfile.babel.js | |
parent | Improve loader themeing (diff) | |
download | ferdium-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.js | 18 |
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 | ||
136 | export 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 | |||
135 | export function sign(done) { | 151 | export 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 | ||
139 | const build = gulp.series( | 155 | const 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 | ); |
143 | export { build }; | 161 | export { build }; |
144 | 162 | ||