Gruntfile.coffee
1.26 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
meta:
banner:
'// rivets.js\n' +
'// version: <%= pkg.version %>\n' +
'// author: <%= pkg.author %>\n' +
'// license: <%= pkg.licenses[0].type %>\n'
coffee:
all:
files:
'dist/rivets.js': 'src/rivets.coffee'
concat:
all:
options:
banner: '<%= meta.banner %>'
files:
'dist/rivets.js': 'dist/rivets.js'
uglify:
all:
options:
banner: '<%= meta.banner %>'
report: 'gzip'
files:
'dist/rivets.min.js': 'dist/rivets.js'
jasmine:
all:
src: 'dist/rivets.js'
options:
specs: 'spec/rivets/**/*.js'
helpers: 'spec/lib/**/*.js'
watch:
all:
files: 'src/rivets.coffee'
tasks: ['build', 'spec']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', ['watch']
grunt.registerTask 'spec', ['jasmine']
grunt.registerTask 'build', ['coffee', 'concat', 'uglify']