/
GruntFile.coffee
83 lines (71 loc) · 1.97 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
80
81
82
83
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffee:
dist:
options:
join: true
files:
'dist/app.js': [
'app/scripts/spectrum.coffee'
'app/scripts/audio.coffee'
'app/scripts/whitecap.coffee'
'app/scripts/app.coffee'
'app/scripts/controllers.coffee'
'app/scripts/directives.coffee'
'app/scripts/services.coffee'
]
# copy:
# dist:
# expand: true
# filter: 'isFile'
# src: 'assets/*'
# dest: 'dist/'
jade:
dist:
options:
data:
debug: false
files:
'dist/index.html': ['app/views/index.jade']
sass:
dist:
options:
outputStyle: 'compressed'
files:
'dist/app.css': 'app/styles/app.scss'
autoprefixer:
dist:
files:
'dist/app.css':'dist/app.css'
watch:
tasks: ['coffee', 'jade', 'sass', 'autoprefixer']
files: [
'app/**/*'
]
options:
livereload: true
uglify:
my_target:
files:
'dist/vendor.min.js': [
'bower_components/jquery/dist/jquery.min.js'
'bower_components/angular/angular.min.js'
'bower_components/underscore/underscore.js'
]
connect:
server:
options:
port: 8888
base: 'dist'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-sass'
grunt.loadNpmTasks 'grunt-autoprefixer'
grunt.registerTask 'default', ['coffee', 'jade', 'sass', 'autoprefixer']
grunt.registerTask 'vendor', ['uglify']
grunt.registerTask 'server', ['default', 'connect', 'watch']