-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
128 lines (119 loc) · 3.72 KB
/
Gruntfile.coffee
File metadata and controls
128 lines (119 loc) · 3.72 KB
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
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compile:
files:
"test/spec/modelSpec.js": "test/spec/modelSpec.coffee"
"test/spec/dataSpec.js": "test/spec/dataSpec.coffee"
glob_to_multipe:
# options:
# sourceMap: true
expand: true
src: ['src/*.coffee']
dest: 'build/'
ext: '.js'
concat:
css:
src:[
"css/bootstrap.css"
"css/bootstrap-responsive.css"
"css/stylePagination.css"
"css/jquery-ui.css"
"css/input/table.css"
"css/jquery.jtweetsanywhere-1.3.1.css"
"css/common.css"
"css/bootstrapSwitch.css"
"css/vis.css"
"css/default-table.css"
"css/input/jquery.handsontable.full.css"
"css/chardinjs/chardinjs.css"
"css/SOCR_Tools_style.css"
"css/loading.css"
"bower_components/please-wait/build/please-wait.css"
]
dest:"dist/app.css"
js:
src:[
"src/init.js"
"src/lib/jquery.min.js"
"src/lib/async.js"
"src/bootstrap/bootstrap.min.js"
"src/exp/core.js"
"src/exp/binomialCoin.js"
"src/exp/ballAndUrn.js"
"src/exp/cardExp.js"
"src/exp/betaBinomial.js"
"src/input/inputtable.js"
"build/src/appModel.js"
"build/src/appView.js"
"build/src/appController.js"
"build/src/appData.js"
"src/lib/jquery-ui.min.js"
"src/vis/d3.v2.min.js"
"src/vis/vis.js"
"src/jquery.paginate.js"
"src/update.js"
"src/lib/jtweet/jquery.jtweetsanywhere-1.3.1.min.js"
"src/lib/jquery.transit.min.js"
"src/lib/jquery.easing.1.3.js"
"src/lib/jquery.pubsub.js"
"src/lib/jquery.handsontable.full.js"
"src/input/data.js"
"src/input/worldbank.js"
"src/vis/tooltip.js"
"src/tools/FCal.js"
"src/tools/ZCal.js"
"src/lib/mustache/mustache.js"
"src/lib/chardinjs/chardinjs.min.js"
"src/tutorial/tutorial.js"
"src/utils.js"
"src/bootstrap/bootstrapSwitch.js"
"src/config.js"
"src/bootstrap/bootstrap.min.js"
]
dest:"dist/bundle.js"
copy:
main:
files:[
{
expand: true
cwd: 'src'
src: ['exp/*']
dest: 'dist/'
filter: 'isFile'
}
{
expand: true
cwd: 'src'
src:'tutorial/tutorial-data.json'
dest:'dist/'
filter: 'isFile'
}
{
expand: true
cwd: 'src'
src:'partials/**/*'
dest:'dist/'
filter: 'isFile'
}
]
jasmine:
#ideally the src should concatenated files.
src: ["src/init.js","src/lib/jquery.min.js","src/utils.js","src/lib/jquery.pubsub.js","src/tools/Fcal.js","src/tools/Zcal.js","src/exp/core.js","dist/bundle.js"]
options:
specs: "test/spec/*Spec.js"
jshint:
files:"dist/bundle.js"
# Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks "grunt-contrib-jasmine"
grunt.loadNpmTasks "grunt-contrib-jshint"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.loadNpmTasks "grunt-contrib-copy"
# Default task(s).
grunt.registerTask "build", ["coffee","concat"]
grunt.registerTask "compile", ["coffee"]
grunt.registerTask "test", ["coffee","concat","copy","jasmine"]
grunt.registerTask "default", ["coffee","concat","copy"]