-
Notifications
You must be signed in to change notification settings - Fork 46
/
Gruntfile.coffee
62 lines (55 loc) · 1.76 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module.exports = (grunt) ->
require('time-grunt') grunt
grunt.config.init
coffee:
source:
files:
'dist/angular-validator.js': ['src/*.coffee']
rules:
files:
'dist/angular-validator-rules.js': ['rules/*.coffee']
demo:
files:
'example/demo.js': 'example/demo.coffee'
uglify:
build:
files:
'dist/angular-validator.min.js': 'dist/angular-validator.js'
'dist/angular-validator-rules.min.js': 'dist/angular-validator-rules.js'
watch:
coffee:
files: ['src/*.coffee', 'rules/*.coffee', 'example/*.coffee']
tasks: ['coffee']
options:
spawn: no
connect:
server:
options:
protocol: 'http'
hostname: '*'
port: 8000
base: '.'
karma:
angular:
configFile: 'test/karma.config.coffee'
# -----------------------------------
# register task
# -----------------------------------
grunt.registerTask 'dev', [
'coffee'
'connect'
'watch'
]
grunt.registerTask 'build', [
'coffee'
'uglify'
]
grunt.registerTask 'test', ['karma']
# -----------------------------------
# Plugins
# -----------------------------------
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-contrib-uglify'