forked from steveblue/fa-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
77 lines (66 loc) · 1.79 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Gulpfile.js
//"use strict";
var gulp = require('gulp'),
runSequence = require('run-sequence');
/*
*
* Tasks are now located in the 'tasks' folder at the root directory
* Options for compile steps are now located in the respective task file
* Paths for build and source locations are in config.paths.js at the root directory
*
*/
var loadTasksFromFiles = require('require-dir')('./tasks');
// Development and Production Build tasks
// Tasks currently using runSequence plugin until gulp 4 resolves dependency task issues.
// DEV TASKS
// Build Dev Site 'build/www' for local dev
gulp.task('dev:build:local', function(callback){
runSequence(
'clean:dev',
'jshint',
['symlink', 'symlink:lib', 'symlink:assets'],
['sass:dev'/*, 'traceur:dev'*/],
callback
);
});
// Build Dev Site 'build/www' for server build
gulp.task('dev:build', function(callback){
runSequence(
'clean:dev',
['copy:dev', 'copy:dev:lib', 'copy:dev:assets'],
['sass:dev:min'/*, 'traceur:dev:min'*/],
callback
);
});
// Run dev:build:local then start watch tasks and spin up dev server
gulp.task('dev', function(callback){
runSequence(
'dev:build:local',
[/*'jshint:watch',*/ 'sass:watch'/*, 'traceur:watch'*/],
'server:dev',
callback
);
});
// PROD TASKS
// Build Prod Site 'build/prod'
gulp.task('prod', ['prod:build']); // alias prod to prod:build
gulp.task('prod:build', function(callback){
runSequence(
'clean:prod',
['copy:prod', 'copy:prod:lib', 'copy:prod:assets'],
['sass:prod'/*, 'traceur:prod'*/],
callback
);
});
// MISC TASKS
// Run Both Dev and Prod with Server side by side
gulp.task('compare', function(callback){
runSequence(
'dev',
'prod',
'server:prod',
callback
);
});
// Make dev default
gulp.task('default', ['dev']);