-
Notifications
You must be signed in to change notification settings - Fork 312
/
Gruntfile.coffee
152 lines (140 loc) · 4.26 KB
/
Gruntfile.coffee
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
jshint:
core: [ 'dev/src/*.js', '!dev/src/_*.js' ]
plugins: [ 'dev/src/*.js', '!dev/src/_*.js', 'dev/plugins/*.js' ]
collada: [ 'dev/plugins/collada.gl.enchant.js' ]
mixing: [ 'dev/src/*.js', '!dev/src/_*.js',
'dev/plugins/mixing.enchant.js' ]
options:
curly: true
eqeqeq: true
immed: true
latedef: true
newcap: false
noarg: true
sub: true
undef: true
boss: true
eqnull: true
browser: true
proto: true
multistr: true
globals:
enchant: true
webkitAudioContext: true
DocumentFragment: true
WebGLBuffer: true
gl: true
Ammo: true
vec2: true
vec3: true
vec4: true
mat2: true
mat3: true
mat4: true
quat4: true
concat:
dist:
src: [
'dev/src/_intro.js'
'dev/src/header.js'
'dev/src/Class.js'
'dev/src/Env.js'
'dev/src/Event.js'
'dev/src/EventTarget.js'
'dev/src/Core.js'
'dev/src/Game.js'
'dev/src/InputManager.js'
'dev/src/InputSource.js'
'dev/src/BinaryInputManager.js'
'dev/src/BinaryInputSource.js'
'dev/src/KeyboardInputManager.js'
'dev/src/KeyboardInputSource.js'
'dev/src/Node.js'
'dev/src/Entity.js'
'dev/src/Sprite.js'
'dev/src/Label.js'
'dev/src/Map.js'
'dev/src/Group.js'
'dev/src/Matrix.js'
'dev/src/DetectColorManager.js'
'dev/src/DomManager.js'
'dev/src/DomLayer.js'
'dev/src/CanvasLayer.js'
'dev/src/CanvasRenderer.js'
'dev/src/Scene.js'
'dev/src/LoadingScene.js'
'dev/src/CanvasScene.js'
'dev/src/DOMScene.js'
'dev/src/Surface.js'
'dev/src/Deferred.js'
# sound support
'dev/src/DOMSound.js'
'dev/src/WebAudioSound.js'
'dev/src/Sound.js'
# animation feature
'dev/src/Easing.js'
'dev/src/ActionEventTarget.js'
'dev/src/Timeline.js'
'dev/src/Action.js'
'dev/src/ParallelAction.js'
'dev/src/Tween.js'
'dev/src/_outro.js'
]
dest: 'dev/enchant.js'
options:
process: true
banner: """
/**
* <%= pkg.name %> v<%= pkg.version %>
* <%= pkg.homepage %>
*
* Copyright UEI Corporation
* Released under the MIT license.
*/\n\n
"""
uglify:
dist:
files:
'enchant.min.js': [ 'dev/enchant.js' ]
options:
banner: "/* <%= pkg.name %> v<%= pkg.version %> <%= pkg.homepage %> Copyright (c) UEI Corporation Released Under the MIT license. */\n"
qunit:
files: [ 'tests/qunit/*/*.html' ]
mocha:
all:
src: ['tests/mocha/**/*.html']
options:
log: true
reporter: 'Spec'
timeout: 10000
core:
src: ['tests/mocha/enchant.js/*.html']
options:
log: true
reporter: 'Spec'
timeout: 10000
exec:
whatever:
cmd: (command) -> command
watch:
core:
files: [ 'dev/src/*.js' ]
tasks: [ 'concat', 'uglify' ]
plugins:
files: [ 'dev/src/*.js', 'dev/plugins/*.js' ]
tasks: [ 'jshint', 'concat', 'uglify', 'exec:lang' ]
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-qunit'
grunt.loadNpmTasks 'grunt-mocha'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-mocha'
grunt.loadNpmTasks 'grunt-exec'
grunt.loadTasks 'tasks/'
# Default task.
grunt.registerTask 'default', [ 'jshint:core', 'concat', 'uglify', 'mocha:all', 'lang:en', 'lang:ja', 'lang:de', 'build' ]