-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
67 lines (57 loc) · 1.39 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
module.exports = (grunt) ->
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
src =
less: [
'app/less/**/*.less'
]
css: [
'bower_components/normalize-css/normalize.css',
'app/less/compiled.css'
]
js: [
'bower_components/angular/angular.js',
'app/js/**/*.js'
]
watchTasks = ['less', 'cssmin', 'uglify']
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
connect:
options:
base: 'app/'
webserver:
options:
port: 8000
keepalive: true
devserver:
options:
port: 8000
testserver:
options:
port: 9000
coverage:
options:
base: 'coverage/'
port: 5000
keepalive: true
less:
development:
files:
'app/less/compiled.css': src.less
cssmin:
minify:
src: src.css
dest: 'app/assets/app.css'
uglify:
assets:
files:
'app/assets/app.js': src.js
watch:
assets:
files: src.less.concat src.js
tasks: watchTasks
grunt.registerTask('default', ['dev']);
grunt.registerTask('dev', watchTasks.concat ['connect:devserver', 'watch:assets']);