diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-04-29 12:49:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 10:49:10 +0000 |
commit | d433ac994f4a25cbac913ea8528029c33af06da1 (patch) | |
tree | 6b2e08173da3113fc46ede79c2009d0bb3b457dd /gulpfile.babel.js | |
parent | docs: add kris7t as a contributor (#1318) (diff) | |
download | ferdium-app-d433ac994f4a25cbac913ea8528029c33af06da1.tar.gz ferdium-app-d433ac994f4a25cbac913ea8528029c33af06da1.tar.zst ferdium-app-d433ac994f4a25cbac913ea8528029c33af06da1.zip |
Electron 12 and nodejs 14 support (#1308)
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r-- | gulpfile.babel.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index d3d6a931d..6a788a9ae 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js | |||
@@ -7,7 +7,7 @@ import csso from 'gulp-csso'; | |||
7 | import terser from 'terser'; | 7 | import terser from 'terser'; |
8 | import composer from 'gulp-uglify/composer'; | 8 | import composer from 'gulp-uglify/composer'; |
9 | import htmlMin from 'gulp-htmlmin'; | 9 | import htmlMin from 'gulp-htmlmin'; |
10 | import server from 'gulp-server-livereload'; | 10 | import connect from 'gulp-connect'; |
11 | import { exec } from 'child_process'; | 11 | import { exec } from 'child_process'; |
12 | import dotenv from 'dotenv'; | 12 | import dotenv from 'dotenv'; |
13 | import sassVariables from 'gulp-sass-variables'; | 13 | import sassVariables from 'gulp-sass-variables'; |
@@ -138,7 +138,8 @@ export function html() { | |||
138 | collapseWhitespace: true, | 138 | collapseWhitespace: true, |
139 | removeComments: true | 139 | removeComments: true |
140 | }))) | 140 | }))) |
141 | .pipe(gulp.dest(paths.html.dest)); | 141 | .pipe(gulp.dest(paths.html.dest)) |
142 | .pipe(connect.reload()); | ||
142 | } | 143 | } |
143 | 144 | ||
144 | export function styles() { | 145 | export function styles() { |
@@ -165,7 +166,8 @@ export function styles() { | |||
165 | .pipe((gulpIf(process.env.NODE_ENV !== 'development', csso({ // Only minify in production to speed up dev builds | 166 | .pipe((gulpIf(process.env.NODE_ENV !== 'development', csso({ // Only minify in production to speed up dev builds |
166 | restructure: false, // Don't restructure CSS, otherwise it will break the styles | 167 | restructure: false, // Don't restructure CSS, otherwise it will break the styles |
167 | })))) | 168 | })))) |
168 | .pipe(gulp.dest(paths.styles.dest)); | 169 | .pipe(gulp.dest(paths.styles.dest)) |
170 | .pipe(connect.reload()); | ||
169 | } | 171 | } |
170 | 172 | ||
171 | export function verticalStyle() { | 173 | export function verticalStyle() { |
@@ -192,7 +194,8 @@ export function verticalStyle() { | |||
192 | .pipe((gulpIf(process.env.NODE_ENV !== 'development', csso({ // Only minify in production to speed up dev builds | 194 | .pipe((gulpIf(process.env.NODE_ENV !== 'development', csso({ // Only minify in production to speed up dev builds |
193 | restructure: false, // Don't restructure CSS, otherwise it will break the styles | 195 | restructure: false, // Don't restructure CSS, otherwise it will break the styles |
194 | })))) | 196 | })))) |
195 | .pipe(gulp.dest(paths.verticalStyle.dest)); | 197 | .pipe(gulp.dest(paths.verticalStyle.dest)) |
198 | .pipe(connect.reload()); | ||
196 | } | 199 | } |
197 | 200 | ||
198 | export function scripts() { | 201 | export function scripts() { |
@@ -204,7 +207,8 @@ export function scripts() { | |||
204 | }), | 207 | }), |
205 | ) | 208 | ) |
206 | .pipe(gulpIf(process.env.NODE_ENV !== 'development', uglify())) // Only uglify in production to speed up dev builds | 209 | .pipe(gulpIf(process.env.NODE_ENV !== 'development', uglify())) // Only uglify in production to speed up dev builds |
207 | .pipe(gulp.dest(paths.scripts.dest)); | 210 | .pipe(gulp.dest(paths.scripts.dest)) |
211 | .pipe(connect.reload()); | ||
208 | } | 212 | } |
209 | 213 | ||
210 | export function watch() { | 214 | export function watch() { |
@@ -218,11 +222,10 @@ export function watch() { | |||
218 | } | 222 | } |
219 | 223 | ||
220 | export function webserver() { | 224 | export function webserver() { |
221 | gulp.src([paths.dest]).pipe( | 225 | connect.server({ |
222 | server({ | 226 | root: paths.dest, |
223 | livereload: true, | 227 | livereload: true |
224 | }), | 228 | }); |
225 | ); | ||
226 | } | 229 | } |
227 | 230 | ||
228 | export function recipes() { | 231 | export function recipes() { |