forked from metafizzy/isotope-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
59 lines (48 loc) · 1.08 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
var gulp = require('gulp');
// ----- site ----- //
// stuff used across tasks
var site = {
// templating data
data: {
productName: 'Isotope',
description: 'Filter & sort magical layouts',
majorVersion: 3,
isDev: process.argv[2] == 'dev',
isExport: process.argv[2] == 'export',
},
// src to watch, tasks to trigger
watches: [],
watch: function( src, tasks ) {
site.watches.push( [ src, tasks ] );
}
};
// ----- tasks ----- //
require('./tasks/assets')( site );
require('./tasks/dist')( site );
require('./tasks/hint')( site );
require('./tasks/js')( site );
require('./tasks/css')( site );
require('./tasks/content')( site );
// ----- default ----- //
gulp.task( 'default', [
'hint',
'content',
'js',
'css',
'dist',
'prod-assets'
] );
// ----- export ----- //
// version of site used in packery-docs.zip
gulp.task( 'export', [ 'default' ] );
// ----- watch ----- //
gulp.task( 'dev', [
'hint',
'dist',
'prod-assets',
'content'
], function() {
site.watches.forEach( function( watchable ) {
gulp.watch.apply( gulp, watchable );
});
});