-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgruntfile.coffee
45 lines (37 loc) · 1.38 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON "package.json"
src:
file: 'arrayext'
resources:
src: ['src/<%= src.file %>.coffee']
test: ['test/*.coffee']
banner: '/* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("yyyy/mm/dd") %>\n' +
'<%= pkg.description %> - <%= pkg.homepage %>\n' +
'Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>(<%= pkg.author.nickname %>)' +
' - Under <%= pkg.license %> License */\n'
coffee:
src:
files:
'src/<%= src.file %>.js': '<%= resources.src %>'
'test/<%= src.file %>.js': '<%= resources.test %>'
uglify:
options:
compress: false
banner: '<%= resources.banner %>'
package:
files: 'package/<%=src.file%>.js': 'src/<%= src.file %>.js'
jasmine:
pivotal:
src: 'package/<%= src.file %>.js'
options:
specs: 'test/<%= src.file %>.js',
watch:
src:
files: ['<%= resources.src %>', '<%= resources.test %>']
tasks: ['coffee', 'uglify', 'jasmine']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.registerTask 'default', ['coffee', 'uglify', 'jasmine']