Gruntfile.coffee
1.07 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
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:
'lib/rivets.js': 'src/rivets.coffee'
uglify:
all:
options:
banner: '<%= meta.banner %>'
files:
'lib/rivets.min.js': 'lib/rivets.js'
jasmine:
all:
src: 'lib/rivets.js'
options:
specs: 'spec/rivets/**/*.js'
helpers: ['spec/matchers.js', 'spec/mock.data.js']
watch:
all:
files: 'src/rivets.coffee'
tasks: ['build', 'spec']
grunt.loadNpmTasks 'grunt-contrib-coffee'
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', 'uglify']