forked from CityOfBoston/patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
39 lines (33 loc) · 1.17 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
38
39
'use strict';
let gulp = require('gulp');
let util = require('gulp-util');
let plugins = require('gulp-load-plugins')();
let runSequence = require('run-sequence');
// Set some plugins that aren't magically included
plugins.poststylus = require('poststylus');
plugins.autoprefixer = require('autoprefixer');
// Set config options needed
let options = {
dest: "./assets/"
};
// Create object of needed paths
options.paths = {
ie: options.dest + 'ie',
image: options.dest + 'images',
script: options.dest + 'scripts',
styles: options.dest + 'css'
}
// This will get the task to allow us to use the configs above
function getTask(task) {
return require('./gulp-tasks/' + task)(gulp, plugins, options, util);
}
// Tasks!
// -----------------------
gulp.task('images', getTask('images'));
gulp.task('scripts', getTask('scripts'));
gulp.task('watch:scripts', getTask('scripts_watch'));
gulp.task('stylus', getTask('stylus'));
gulp.task('stylus:ie', getTask('stylus_IE'));
gulp.task('watch:stylus', getTask('stylus_watch'));
gulp.task('build', ['images', 'stylus', 'scripts', 'stylus:ie']);
gulp.task('default', ['images', 'scripts', 'watch:scripts', 'stylus', 'stylus:ie', 'watch:stylus']);