forked from divshot/themestrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
68 lines (66 loc) · 2.02 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
module.exports = (grunt) ->
grunt.initConfig
bowerDirectory: require('bower').config.directory
less:
compile:
options:
compress: false
paths: ['less', 'tmp', '<%= bowerDirectory %>/bootstrap/less']
files:
'dist/css/bootstrap.css': ['less/theme.less']
recess:
dist:
options:
compile: true
files:
'dist/css/bootstrap.css': ['dist/css/bootstrap.css']
watch:
less:
files: ['less/*.less']
tasks: ['copy', 'less:compile', 'clean']
options:
livereload: true
cssmin:
files: ['dist/css/bootstrap.css']
tasks: ['cssmin:minify']
assemble:
files: ['pages/*', 'README.md']
tasks: ['assemble']
cssmin:
minify:
expand: true
cwd: 'dist/css'
src: ['*.css', '!*.min.css']
dest: 'dist/css'
ext: '.min.css'
connect:
serve:
options:
port: grunt.option('port') || '8000'
hostname: grunt.option('host') || 'localhost'
assemble:
pages:
options:
data: './bower.json',
flatten: true,
assets: 'dist'
files:
'dist/': ['pages/*.html']
copy:
bootstrap:
files: [
{ expand: true, cwd: '<%= bowerDirectory %>/bootstrap/less', src: ['bootstrap.less'], dest: 'tmp/' },
{ expand: true, cwd: '<%= bowerDirectory %>/bootstrap/fonts', src: ['*'], dest: 'dist/fonts' }
]
clean: ['tmp']
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-recess')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-text-replace')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-connect')
grunt.loadNpmTasks('assemble')
grunt.registerTask('default', ['copy', 'less', 'recess', 'cssmin', 'assemble', 'clean'])
grunt.registerTask('serve', ['connect', 'watch'])