-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
82 lines (71 loc) · 2.21 KB
/
Gruntfile.coffee
File metadata and controls
82 lines (71 loc) · 2.21 KB
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
module.exports = (grunt) ->
dist_directory = "dist"
vendorfiles = {
fonts: [
'components/font-awesome/font/FontAwesome.otf'
'components/font-awesome/font/fontawesome-webfont.eot'
'components/font-awesome/font/fontawesome-webfont.svg'
'components/font-awesome/font/fontawesome-webfont.ttf'
'components/font-awesome/font/fontawesome-webfont.woff'
]
js: [
"components/jquery/jquery.min.js"
"components/bootstrap/js/bootstrap-transition.js"
"components/bootstrap/js/bootstrap-alert.js"
"components/bootstrap/js/bootstrap-modal.js"
"components/bootstrap/js/bootstrap-dropdown.js"
"components/bootstrap/js/bootstrap-scrollspy.js"
"components/bootstrap/js/bootstrap-tab.js"
"components/bootstrap/js/bootstrap-tooltip.js"
"components/bootstrap/js/bootstrap-popover.js"
"components/bootstrap/js/bootstrap-button.js"
"components/bootstrap/js/bootstrap-collapse.js"
"components/bootstrap/js/bootstrap-carousel.js"
"components/bootstrap/js/bootstrap-typeahead.js"
]
}
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-contrib-clean')
# Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
delta:
less:
tasks: 'less'
files: ['less/*.less', 'less/**/*.less']
less:
all:
options:
paths: ["less", "components"]
files:
"css/styles.css": "less/styles.less"
copy:
vendor:
files: [{
expand: true
flatten: true
src: vendorfiles.fonts
dest: "#{dist_directory}/vendor/fonts/"
}, {
expand: true
flatten: true
src: vendorfiles.js
dest: "#{dist_directory}/vendor/js/"
}]
clean:
dist: ['dist']
})
grunt.registerTask('build', [
'less:all'
'copy:vendor'
])
# Rename the watch task to delta, and make a new watch task that runs
# build on startup
grunt.renameTask('watch', 'delta')
grunt.registerTask('watch', [
'build'
'delta'
])
grunt.registerTask('default', ['build'])