forked from datenpate/angular-hue-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
45 lines (42 loc) · 1.19 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.registerTask 'build', [
'coffeelint'
'coffee'
'uglify'
]
grunt.registerTask 'default', [
'coffeelint',
'coffee',
'watch'
]
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
paths:
build: 'dist'
src: 'src'
coffee: [
'src/**/*.coffee'
'!src/**/*.spec.coffee'
]
coffeeunit: [ 'src/**/*.spec.coffee' ]
coffee: source:
options: bare: true
src: '<%= paths.src %>/hue.coffee'
dest: '<%= paths.build %>/hue-service.js'
coffeelint:
src: files: src: [ '<%= paths.coffee %>' ]
test: files: src: [ '<%= paths.coffeeunit %>' ]
options: 'max_line_length': 'level': 'ignore'
uglify:
options: banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
dist: files: '<%= paths.build %>/hue-service.min.js': [ '<%= paths.build %>/hue-service.js' ]
watch:
files: [ '<%= paths.coffee %>' ]
tasks: [
'coffeelint'
'coffee'
]
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-uglify'