-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
53 lines (51 loc) · 1.41 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
module.exports = (grunt) ->
grunt.initConfig
uglify:
options:
mangle: true
compress: {}
sourceMap: true
sourceMapIncludeSources: true
build:
src: 'dist/modelize/**/*.js'
dest: 'dist/modelize.min.js'
concat:
dist:
src: 'dist/modelize/**/*.js'
dest: 'dist/modelize.js'
coffee:
main:
options:
bare: true
sourceMap: true
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'dist/modelize/'
ext: '.js'
spec:
options:
bare: true
expand: true
cwd: 'spec_src'
src: ['**/*.coffee']
dest: 'spec/'
ext: '.js'
jasmine:
src: [ 'dist/modelize.js' ]
options:
specs: [ 'spec/*.js' ]
vendor: [
'node_modules/jasmine-ajax/lib/mock-ajax.js',
'vendor/jquery/dist/jquery.min.js',
'vendor/jquery.rest/dist/1/jquery.rest.min.js',
'vendor/knockout/dist/knockout.js',
'vendor/sjcl/sjcl.js'
]
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-browserify'
grunt.registerTask 'default', ['coffee', 'uglify', 'concat', 'jasmine']
grunt.registerTask 'test', ['coffee:spec', 'jasmine']