-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
53 lines (51 loc) · 1.48 KB
/
Copy pathGruntfile.coffee
File metadata and controls
53 lines (51 loc) · 1.48 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
53
module.exports = (grunt) ->
banner = """
/*
* <%= pkg.name %>
* https://github.com/dnroot/angular-color-interpolator
* @version <%= pkg.version %> <<%= grunt.template.today("yyyy-mm-dd") %>>
* @author Dan Root
* @license MIT
*/
"""
# Project configuration
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
usebanner:
default:
options:
position: 'top'
banner: banner
files:
src: ['release/*.js']
coffee:
compile:
files:
'release/<%= pkg.name %>.js': 'src/<%= pkg.name %>.coffee'
coffeelint:
app: ['src/*.coffee']
uglify:
build:
src: 'release/<%= pkg.name %>.js'
dest: 'release/<%= pkg.name %>.min.js'
karma:
unit:
options:
frameworks: ['jasmine']
singleRun: true
browsers: ['PhantomJS']
files: [
'bower_components/angular/angular.js'
'bower_components/angular-mocks/angular-mocks.js'
'release/angular-color-interpolator.js'
'spec/helper.js'
'spec/data.js'
'spec/**/*.js'
]
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-banner')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-karma')
grunt.registerTask('default', ['coffeelint', 'coffee', 'uglify', 'usebanner', 'karma'])
grunt.registerTask('test', ['coffeelint', 'coffee', 'karma'])