diff options
author | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2021-11-06 14:54:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-06 14:54:01 +0530 |
commit | 29902d83843ee6a59f152b8dd1bab8ffc7019f6f (patch) | |
tree | a434ca7a9583b6e0c671016d31a38bad31e2e209 /gulpfile.babel.js | |
parent | 5.6.3-nightly.53 [skip ci] (diff) | |
download | ferdium-app-29902d83843ee6a59f152b8dd1bab8ffc7019f6f.tar.gz ferdium-app-29902d83843ee6a59f152b8dd1bab8ffc7019f6f.tar.zst ferdium-app-29902d83843ee6a59f152b8dd1bab8ffc7019f6f.zip |
chore: update 'node-gyp' and '@types/tar' modules; (#2183)
replace 'terser' with 'gulp-terser' to reduce custom code
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r-- | gulpfile.babel.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 9d6d1bd18..7368c7774 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js | |||
@@ -4,8 +4,7 @@ import babel from 'gulp-babel'; | |||
4 | import dartSass from 'sass'; | 4 | import dartSass from 'sass'; |
5 | import gulpSass from 'gulp-sass'; | 5 | import gulpSass from 'gulp-sass'; |
6 | import csso from 'gulp-csso'; | 6 | import csso from 'gulp-csso'; |
7 | import terser from 'terser'; | 7 | import terser from 'gulp-terser'; |
8 | import composer from 'gulp-uglify/composer'; | ||
9 | import htmlMin from 'gulp-htmlmin'; | 8 | import htmlMin from 'gulp-htmlmin'; |
10 | import connect from 'gulp-connect'; | 9 | import connect from 'gulp-connect'; |
11 | import { exec } from 'child_process'; | 10 | import { exec } from 'child_process'; |
@@ -24,7 +23,6 @@ import * as rawStyleConfig from './scripts/theme/default/legacy'; | |||
24 | dotenv.config(); | 23 | dotenv.config(); |
25 | 24 | ||
26 | const sass = gulpSass(dartSass); | 25 | const sass = gulpSass(dartSass); |
27 | const uglify = composer(terser, console); | ||
28 | 26 | ||
29 | const isDevBuild = process.env.NODE_ENV === 'development'; | 27 | const isDevBuild = process.env.NODE_ENV === 'development'; |
30 | 28 | ||
@@ -200,7 +198,7 @@ export function processJavascripts() { | |||
200 | comments: false, | 198 | comments: false, |
201 | }), | 199 | }), |
202 | ) | 200 | ) |
203 | .pipe(gulpIf(!isDevBuild, uglify())) // Only uglify in production to speed up dev builds | 201 | .pipe(gulpIf(!isDevBuild, terser())) // Only uglify in production to speed up dev builds |
204 | .pipe(gulp.dest(paths.javascripts.dest)) | 202 | .pipe(gulp.dest(paths.javascripts.dest)) |
205 | .pipe(connect.reload()); | 203 | .pipe(connect.reload()); |
206 | } | 204 | } |
@@ -214,7 +212,7 @@ export function processTypescripts() { | |||
214 | comments: false, | 212 | comments: false, |
215 | }), | 213 | }), |
216 | ) | 214 | ) |
217 | .pipe(gulpIf(!isDevBuild, uglify())) // Only uglify in production to speed up dev builds | 215 | .pipe(gulpIf(!isDevBuild, terser())) // Only uglify in production to speed up dev builds |
218 | .pipe(gulp.dest(paths.typescripts.dest)) | 216 | .pipe(gulp.dest(paths.typescripts.dest)) |
219 | .pipe(connect.reload()); | 217 | .pipe(connect.reload()); |
220 | } | 218 | } |