forked from englercj/lttp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (27 loc) · 940 Bytes
/
gulpfile.js
File metadata and controls
31 lines (27 loc) · 940 Bytes
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
var gulp = require('gulp'),
fs = require('fs'),
config = require('./tasks/config.js');;
var files = fs.readdirSync('./tasks');
files.forEach(function (file) {
try {
require('./tasks/' + file);
} catch(e) {
console.error('Unable to require file "' + file + '":', e);
}
});
/*****
* Dev task, incrementally rebuilds less and scripts for development
*****/
gulp.task('dev', ['build', 'serve'], function () {
gulp.watch('./index.html', ['copy:index']);
gulp.watch('./src/ts/**/*.ts', ['scripts']);
gulp.watch('./src/less/**/*.less', ['less']);
gulp.watch('./src/assets/**/*.png', ['assets:imagemin']);
gulp.watch('./src/assets/**/*.{json,tmx}', ['assets:tilemap-pack', 'assets:jsonmin', 'assets:copy']);
gulp.watch(config.vendorFiles, ['copy:vendor']);
});
/*****
* Base tasks
*****/
gulp.task('build', ['less', 'scripts', 'copy', 'assets']);
gulp.task('default', ['build']);