-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.coffee
47 lines (41 loc) · 1.08 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
46
47
module.exports = (grunt) ->
pkg = grunt.file.readJSON 'package.json'
config =
clean: ['dist']
coffee:
main:
expand: true
cwd: 'src/'
src: ['**/**.coffee']
dest: 'dist/'
ext: '.js'
uglify:
options:
sourceMap: true
banner: "/*! #{ pkg.name } - v#{ pkg.version } */"
main:
expand: true
cwd: 'dist/'
src: '**/**.js'
dest: 'dist/'
ext: '.min.js'
karma:
unit:
options:
frameworks: ['jasmine']
singleRun: true,
browsers: ['PhantomJS']
preprocessors: '**/*.coffee': ['coffee']
files: [
'spec/lib/angular.js'
'spec/lib/angular-mocks.js'
'dist/ng-currency-mask.js'
'spec/tests.coffee'
]
tasks =
build: ['clean', 'coffee', 'uglify']
test: ['karma']
default: ['build', 'test']
grunt.loadNpmTasks name for name of pkg.devDependencies when name[0..4] is 'grunt'
grunt.config.init config
grunt.registerTask name, array for name, array of tasks