-
Notifications
You must be signed in to change notification settings - Fork 339
/
Gruntfile.coffee
79 lines (72 loc) · 2.29 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
module.exports = (grunt) ->
grunt.config.init
compass:
example:
options:
sassDir: 'example'
cssDir: 'example'
outputStyle: 'compressed'
src:
options:
sassDir: 'src'
cssDir: 'dist'
outputStyle: 'compressed'
coffee:
source:
files:
'dist/angular-form-builder.js': ['src/*.coffee']
components:
files:
'dist/angular-form-builder-components.js': ['components/*.coffee']
demo:
files:
'example/demo.js': 'example/demo.coffee'
uglify:
build:
files:
'dist/angular-form-builder.min.js': 'dist/angular-form-builder.js'
'dist/angular-form-builder-components.min.js': 'dist/angular-form-builder-components.js'
watch:
compass:
files: ['example/*.scss', 'src/*.scss']
tasks: ['compass']
options:
spawn: no
coffee:
files: ['src/*.coffee', 'components/*.coffee', 'example/*.coffee']
tasks: ['coffee']
options:
spawn: no
connect:
server:
options:
protocol: 'http'
hostname: '*'
port: 8000
base: '.'
karma:
test:
configFile: 'test/karma.config.coffee'
# -----------------------------------
# register task
# -----------------------------------
grunt.registerTask 'dev', [
'compass'
'coffee'
'connect'
'watch'
]
grunt.registerTask 'build', [
'compass'
'coffee'
'uglify'
]
# -----------------------------------
# Plugins
# -----------------------------------
grunt.loadNpmTasks 'grunt-contrib-compass'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-contrib-uglify'