-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
29 lines (24 loc) · 1.01 KB
/
Copy pathgulpfile.js
File metadata and controls
29 lines (24 loc) · 1.01 KB
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
'use strict';
var _ = require('lodash'),
glob = require('glob'),
gulp = require('gulp'),
path = require('path'),
plugins = require('gulp-load-plugins')(),
runSequence = require('run-sequence');
var buildProperties = {
distTarget : require('path').resolve('./dist')
};
//Override our options with what's loaded from ./gulp-config.json
buildProperties = _.extend(require('./gulp-config.json').config.prod, buildProperties);
//Dynamically load all of the task definitions in ./gulp-tasks/*.js
glob.sync( './gulp-tasks/*.js' ).forEach( function( file ) {
try {
require(path.resolve(file))(gulp, plugins, buildProperties);
}catch(e) {
console.log("\r\nUnable to load gulp tasks from " + file + ": Expecting file to export function(gulp, plugins, buildProperties){...}\r\n");
console.log(e.stack);
}
});
gulp.task('default', function(callback) {
runSequence('build:dist', callback);
});