forked from cabin/utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
53 lines (46 loc) · 1.28 KB
/
Gruntfile.coffee
File metadata and controls
53 lines (46 loc) · 1.28 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) ->
pkg = grunt.file.readJSON('package.json')
grunt.initConfig
pkg: pkg
path:
src: 'src'
dist: 'dist'
coffee:
dist:
expand: true
cwd: '<%= path.src %>'
src: '**/*.coffee'
dest: '<%= path.dist %>'
ext: '.js'
ngmin:
dist:
expand: true
cwd: '<%= path.dist %>'
src: '**/*.js'
dest: '<%= path.dist %>'
watch:
coffee:
files: ['<%= path.src %>/**/*.coffee']
tasks: ['build', 'karma:unit:run']
karma:
files: ['test/**/*.spec.coffee']
tasks: ['karma:unit:run']
karma:
unit:
configFile: 'test/karma.conf.js'
background: true
browsers: ['PhantomJS']
unitSingle:
configFile: 'test/karma.conf.js'
singleRun: true
bump:
options:
files: ['bower.json', 'package.json']
commitFiles: ['bower.json', 'package.json']
pushTo: 'origin'
# Load tasks from all required grunt plugins.
for dep of pkg.devDependencies when dep.indexOf('grunt-') is 0
grunt.loadNpmTasks(dep)
grunt.registerTask('build', ['coffee', 'ngmin'])
grunt.registerTask('test', ['build', 'karma:unitSingle'])
grunt.registerTask('dev', ['build', 'karma:unit', 'watch'])