-
Notifications
You must be signed in to change notification settings - Fork 11
/
Gruntfile.coffee
69 lines (60 loc) · 1.65 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
module.exports = (grunt) ->
grunt.initConfig {
karma:
unit:
frameworks: ['mocha', 'chai-sinon']
browsers: [
'Chrome'
'PhantomJS'
'Firefox'
]
plugins: [
'karma-mocha' # Use mocha for test organization
'karma-mocha-reporter' # Use mocha style of reporting
'karma-chai-sinon' # Use chai/sinon for testing helpers
'karma-firefox-launcher'
'karma-chrome-launcher'
'karma-phantomjs-launcher'
]
files: [
# Require DataTable & it's dependencies
{src: 'bower_components/knockout/dist/knockout.js'}
{src: 'knockout-datatable.js'}
# Require our tests
{src: 'test/**/*.js'}
]
reporters: ['mocha']
# reporters: 'dots'
# runnerPort: 9999
# singleRun: true
# logLevel: 'ERROR'
# compile coffeescript files
coffee:
datatable:
files:
'knockout-datatable.js': 'knockout-datatable.coffee'
# compile less files
less:
datatable:
options:
compress: true
files:
'knockout-datatable.css': 'knockout-datatable.less'
# uglifyjs files
uglify:
datatable:
options:
sourceMap: true,
src: 'knockout-datatable.js'
dest: 'knockout-datatable.min.js'
}
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-karma'
grunt.registerTask('test', ['karma'])
grunt.registerTask('default', [
'coffee',
'less',
'uglify'
])