diff options
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r-- | gulpfile.babel.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index c6fe6975a..02e42e788 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js | |||
@@ -70,6 +70,10 @@ const paths = { | |||
70 | src: 'src/styles/vertical.scss', | 70 | src: 'src/styles/vertical.scss', |
71 | dest: 'build/styles', | 71 | dest: 'build/styles', |
72 | }, | 72 | }, |
73 | animations: { | ||
74 | src: 'src/styles/animations.scss', | ||
75 | dest: 'build/styles', | ||
76 | }, | ||
73 | javascripts: { | 77 | javascripts: { |
74 | src: 'src/**/*.js', | 78 | src: 'src/**/*.js', |
75 | dest: 'build/', | 79 | dest: 'build/', |
@@ -239,6 +243,37 @@ export function verticalStyle() { | |||
239 | .pipe(connect.reload()); | 243 | .pipe(connect.reload()); |
240 | } | 244 | } |
241 | 245 | ||
246 | export function animations() { | ||
247 | return gulp | ||
248 | .src(paths.animations.src) | ||
249 | .pipe( | ||
250 | sassVariables( | ||
251 | Object.assign( | ||
252 | { | ||
253 | $env: getTargetEnv, | ||
254 | }, | ||
255 | ...styleConfig, | ||
256 | ), | ||
257 | ), | ||
258 | ) | ||
259 | .pipe( | ||
260 | sass({ | ||
261 | includePaths: ['./node_modules', '../node_modules'], | ||
262 | }).on('error', sass.logError), | ||
263 | ) | ||
264 | .pipe( | ||
265 | gulpIf( | ||
266 | !isDevBuild, | ||
267 | csso({ | ||
268 | // Only minify in production to speed up dev builds | ||
269 | restructure: false, // Don't restructure CSS, otherwise it will break the styles | ||
270 | }), | ||
271 | ), | ||
272 | ) | ||
273 | .pipe(gulp.dest(paths.animations.dest)) | ||
274 | .pipe(connect.reload()); | ||
275 | } | ||
276 | |||
242 | export function processJavascripts() { | 277 | export function processJavascripts() { |
243 | return gulp | 278 | return gulp |
244 | .src( | 279 | .src( |
@@ -309,7 +344,7 @@ export function recipeInfo() { | |||
309 | const build = gulp.series( | 344 | const build = gulp.series( |
310 | clean, | 345 | clean, |
311 | gulp.parallel(mvSrc, mvPackageJson, mvLernaPackages, exportBuildInfo), | 346 | gulp.parallel(mvSrc, mvPackageJson, mvLernaPackages, exportBuildInfo), |
312 | gulp.parallel(html, processJavascripts, processTypescripts, styles, verticalStyle, recipes, recipeInfo), | 347 | gulp.parallel(html, processJavascripts, processTypescripts, styles, verticalStyle, animations, recipes, recipeInfo), |
313 | ); | 348 | ); |
314 | export { build }; | 349 | export { build }; |
315 | 350 | ||