-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathGruntfile.coffee
77 lines (68 loc) · 1.94 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
#
# Build QuickUI runtime with Grunt.
#
module.exports = ->
@loadNpmTasks "grunt-contrib-coffee"
@loadNpmTasks "grunt-contrib-concat"
@loadNpmTasks "grunt-contrib-less"
@loadNpmTasks "grunt-contrib-uglify"
@initConfig
pkg: @file.readJSON "package.json"
coffee:
quickui:
files: [
# "build/*.js": "src/*.coffee"
expand: true
cwd: "src/"
src: "*.coffee"
dest: "build/"
ext: ".js"
]
options:
bare: true
test:
files:
"test/unittests.js": [
# Basic facilities; helpful to put these first.
"test/control.coffee"
"test/sub.coffee"
# Sample classes used by following tests
"test/sample.coffee"
# Other services
"test/content.coffee"
"test/inDocument.coffee"
"test/json.coffee"
"test/layout.coffee"
"test/localization.coffee"
"test/properties.coffee"
"test/rehydrate.coffee"
"test/styles.coffee"
"test/super.coffee"
"test/utilities.coffee"
]
concat:
quickui:
src: [
"src/intro.js" # Start of function wrapper
"build/control.js" # Defines Control class; must come second.
"build/browser.js"
"build/content.js"
"build/inDocument.js"
"build/json.js"
"build/layout.js"
"build/localization.js"
"build/properties.js"
"build/rehydrate.js"
"build/styles.js"
"build/super.js"
"build/utilities.js"
"src/outro.js" # End of function wrapper.
]
dest: "quickui.js"
uglify:
dist:
files:
"quickui.min.js": "quickui.js"
# Default task.
@registerTask "default", [ "coffee", "concat" ]
@registerTask "all", [ "default", "uglify" ]