forked from mozilla/devtools-perf-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
54 lines (49 loc) · 1.21 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var connect = require('gulp-connect');
var scripts = [
'./script/data.js',
'./script/stats.js',
'./script/Utils.js',
'./script/Playground.js',
'./script/Playground.Scanlines.js',
'./script/Playground.SoundOnDemand.js',
'./script/Engine.js',
'./script/Benchmark.js',
'./script/BackgroundStars.js',
'./script/CircleExplosion.js',
'./script/Ship.js',
'./script/Bullet.js',
'./script/Asteroid.js',
'./script/Cursor.js',
'./script/Resource.js',
'./script/Button.js',
'./script/Particle.js',
'./script/Planet.js',
'./script/Game.js',
'./script/Powerup.js',
'./script/TextOut.js',
'./script/Trail.js',
'./script/Missile.js',
'./script/Gameover.js',
'./script/Main.js',
'./script/bottlenecks.js'
];
gulp.task('server', function() {
connect.server({
livereload: true
});
});
gulp.task('scripts', function() {
gulp.src(scripts)
.pipe(sourcemaps.init())
.pipe(concat('script.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./'))
.pipe(connect.reload());
});
gulp.task('watch', function() {
gulp.watch('./script/*.js', ['scripts']);
});
gulp.task('default', ['scripts', 'server', 'watch']);