-
Notifications
You must be signed in to change notification settings - Fork 11
/
gulpfile.js
80 lines (68 loc) · 2 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
77
78
79
80
var gulp = require('gulp')
//var reload = require('gulp-livereload')
var coffee = require('gulp-coffee')
var concat = require('gulp-concat')
var addsrc = require('gulp-add-src')
var uglify = require('gulp-uglify')
var js_init = './src/init.js'
var js_lib = [
"./src/lib/mithril.js"
, "./src/lib/lz.js"
, "./src/lib/store.js"
, "./src/lib/phaser.js"
]
var js_lvls = "./src/levels/*.js"
var js_app = [
, './src/components/clear_screen.coffee'
, './src/components/counter.coffee'
, './src/components/grid.coffee'
, './src/components/jewel.coffee'
, './src/components/pipe.coffee'
, './src/components/release_button.coffee'
, './src/components/spill.coffee'
, './src/components/godmode.coffee'
, './src/components/editor/pipe_button.coffee'
, './src/components/editor/toolbar.coffee'
, './src/components/pipes/corner.coffee'
, './src/components/pipes/cross.coffee'
, './src/components/pipes/double_corner.coffee'
, './src/components/pipes/end.coffee'
, './src/components/pipes/start.coffee'
, './src/components/pipes/straight.coffee'
, './src/components/level.coffee'
, './src/components/count_gem.coffee'
, './src/components/count_star.coffee'
, './src/components/button_sound.coffee'
, './src/components/button_music.coffee'
, './src/components/button_back.coffee'
, './src/components/button_tab.coffee'
, './src/states/boot.coffee'
, './src/states/levels.coffee'
, './src/states/load.coffee'
, './src/states/menu.coffee'
, './src/states/play.coffee'
, './src/data.coffee'
, './src/game.coffee'
]
gulp.task('js', function() {
return gulp.src(js_app)
.pipe(coffee())
.pipe(addsrc.append(js_lvls))
.pipe(addsrc.prepend(js_lib))
.pipe(addsrc.prepend(js_init))
.pipe(concat('app.js'))
//.pipe(uglify())
.pipe(gulp.dest('./public/'));
});
gulp.task('default', function () {
gulp.run('js');
});
gulp.task('watch', function () {
//reload.listen()
gulp.watch(
[
'./src/init.js',
'./src/**/*.coffee',
]
, ['js']);
});