aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-11-06 14:54:01 +0530
committerLibravatar GitHub <noreply@github.com>2021-11-06 14:54:01 +0530
commit29902d83843ee6a59f152b8dd1bab8ffc7019f6f (patch)
treea434ca7a9583b6e0c671016d31a38bad31e2e209 /gulpfile.babel.js
parent5.6.3-nightly.53 [skip ci] (diff)
downloadferdium-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.js8
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';
4import dartSass from 'sass'; 4import dartSass from 'sass';
5import gulpSass from 'gulp-sass'; 5import gulpSass from 'gulp-sass';
6import csso from 'gulp-csso'; 6import csso from 'gulp-csso';
7import terser from 'terser'; 7import terser from 'gulp-terser';
8import composer from 'gulp-uglify/composer';
9import htmlMin from 'gulp-htmlmin'; 8import htmlMin from 'gulp-htmlmin';
10import connect from 'gulp-connect'; 9import connect from 'gulp-connect';
11import { exec } from 'child_process'; 10import { exec } from 'child_process';
@@ -24,7 +23,6 @@ import * as rawStyleConfig from './scripts/theme/default/legacy';
24dotenv.config(); 23dotenv.config();
25 24
26const sass = gulpSass(dartSass); 25const sass = gulpSass(dartSass);
27const uglify = composer(terser, console);
28 26
29const isDevBuild = process.env.NODE_ENV === 'development'; 27const 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}