-
Notifications
You must be signed in to change notification settings - Fork 67
/
Gruntfile.coffee
98 lines (88 loc) · 2.74 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
path = require 'path'
# Build configurations.
module.exports = (grunt) ->
grunt.initConfig
# Deletes built file and temp directories.
clean:
working:
src: [
'angular-social.*'
'./.temp/views'
'./.temp/'
]
copy:
styles:
files: [
src: './src/styles/angular-social.css'
dest: './angular-social.css'
]
images:
files: [
src: './src/images/*'
dest: './.temp/'
flatten: true
expand: true
]
uglify:
# concat js files before minification
js:
src: ['angular-social.src.js']
dest: 'angular-social.js'
options:
sourceMap: (fileName) ->
fileName.replace /\.js$/, '.map'
concat:
# concat js files before minification
js:
src: ['src/scripts/*.js', './.temp/views.js']
dest: 'angular-social.src.js'
less:
src: ['src/styles/*.less']
dest: 'angular-social.less'
imageEmbed:
css:
src: [ "angular-social.css" ]
dest: "angular-social.css"
baseDir: './'
less:
css:
files:
'angular-social.css': 'angular-social.less'
cssmin:
css:
files:
'angular-social.css': 'angular-social.css'
ngTemplateCache:
views:
files:
'./.temp/views.js': './src/views/**/*.html'
options:
trim: './src'
module: 'ngSocial'
# Register grunt tasks supplied by grunt-contrib-*.
# Referenced in package.json.
# https://github.com/gruntjs/grunt-contrib
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-image-embed'
# Register grunt tasks supplied by grunt-hustler.
# Referenced in package.json.
# https://github.com/CaryLandholt/grunt-hustler
grunt.loadNpmTasks 'grunt-hustler'
grunt.registerTask 'dev', [
'clean'
'ngTemplateCache'
'concat'
'less'
'copy'
'imageEmbed'
]
grunt.registerTask 'default', [
'dev'
'uglify'
'cssmin'
]