-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.coffee
65 lines (57 loc) · 1.69 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
###
Build QuickUI Catalog with Grunt.
###
module.exports = ->
@loadNpmTasks "grunt-contrib-coffee"
@loadNpmTasks "grunt-contrib-concat"
@loadNpmTasks "grunt-contrib-less"
@loadNpmTasks "grunt-contrib-uglify"
@loadTasks "grunt"
sortDependencies = require "sort-dependencies"
@initConfig
pkg: @file.readJSON "package.json"
coffee:
controls:
files:
"controls/controls.js": sortDependencies.sortFiles "controls/*.coffee"
options:
bare: true
test:
files:
"test/unittests.js": "test/*.coffee"
# Build the quidoc Grunt task itself.
tools:
files:
"grunt/quidoc.js": "grunt/quidoc.coffee"
concat:
js:
src: [
"controls/intro.js" # Start of function wrapper
"controls/controls.js"
"controls/outro.js" # End of function wrapper.
]
dest: "quickui.catalog.js"
css:
src: [ "controls/intro.css", "controls/controls.css" ]
dest: "quickui.catalog.css"
demoJs:
src: [ "docs/*/*.js" ]
dest: "docs/demos.js"
demoCss:
src: [ "docs/*/*.css" ]
dest: "docs/demos.css"
less:
controls:
files:
"controls/controls.css": sortDependencies.sortFiles "controls/*.less"
# quidoc CoffeeScript tool needs to be built via coffee task
quidoc:
controls:
src: [ "controls" ]
dest: "docs/controlDocumentation.js"
uglify:
dist:
files:
"quickui.catalog.min.js": "quickui.catalog.js"
@registerTask "default", [ "coffee", "less", "concat" ]
@registerTask "all", [ "coffee:tools", "default", "quidoc", "uglify" ]