-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
55 lines (46 loc) · 1.14 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
var gulp = require("gulp"),
livereload = require('gulp-livereload'),
concat = require("gulp-concat");
var deploymentFolder = './concat/';
gulp.task('default', ['watch']);
gulp.task('watch', () => {
livereload.listen();
gulp.watch('**/*.css', ['reload', 'copy-css']);
gulp.watch('**/*.js', ['concat', 'reload']);
gulp.watch('**/*.html', ['reload']);
});
gulp.task('reload', () => {
livereload.reload();
});
var sketchFolder = "sketch/";
var sketchFiles = [
'constants.js',
'helpers/fifoqueue.js',
'input/inputenum.js',
'gameentities/gameboard.js',
'respawnpopup.js',
'followcam.js',
'input/joystick.js',
'input/steeringdevice.js',
'input/inputmodule.js',
'input/manualinput.js',
'input/perlininput.js',
'gameentities/player.js',
'gameentities/particle.js',
'gameentities/blob.js',
'blobs.js',
'gameentities/brain.js',
'gameentities/blobmanager.js'
];
sketchFiles.forEach((fileName, index) => {
sketchFiles[index] = sketchFolder + fileName;
});
gulp.task('concat', () => {
gulp.src(sketchFiles)
.pipe(concat('concat.js'))
.pipe(gulp.dest(deploymentFolder));
});
gulp.task('copy-css', () => {
gulp.src('style.css')
.pipe(gulp.dest(deploymentFolder));
});