generated from visual-framework/vf-eleventy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
executable file
·37 lines (32 loc) · 1.27 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const path = require('path');
const gulp = require('gulp');
// Pull in optional configuration from the package.json file, a la:
const {componentPath, componentDirectories, buildDestionation} = require('@visual-framework/vf-config');
// Tasks to build/run vf-core component system
require('./node_modules/\@visual-framework/vf-core/gulp-tasks/_gulp_rollup.js')(gulp, path, componentPath, componentDirectories, buildDestionation);
require('./node_modules/\@visual-framework/vf-extensions/gulp-tasks/_gulp_rollup.js')(gulp, path, componentPath, componentDirectories, buildDestionation);
// Watch folders for changess
gulp.task('watch', function() {
// left for convience for local watch additions
gulp.watch(['./build/css/styles.css'], gulp.series('eleventy:reload'));
});
// Let's build this sucker.
gulp.task('build', gulp.series(
'vf-clean',
gulp.parallel('vf-css','vf-scripts','vf-component-assets'),
'vf-css:production', //optimise, prefix css
'fractal:build',
'fractal',
'eleventy:init',
'eleventy:build'
));
// Build and watch things during dev
gulp.task('dev', gulp.series(
'vf-clean',
gulp.parallel('vf-css','vf-scripts','vf-component-assets'),
'fractal:development',
'fractal',
'eleventy:init',
'eleventy:develop',
gulp.parallel('watch','vf-watch')
));