-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathGruntfile.coffee
47 lines (45 loc) · 1.35 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
module.exports = (grunt) ->
grunt.loadTasks '_tasks/'
grunt.loadNpmTasks 'grunt-jekyll'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.initConfig(
jekyll:
build:
src: '_source'
dest: 'site'
future: true
exclude: './_source/styles/'
connect:
server:
options:
port: 4000
keepalive: true
base: 'site'
hostname: '*'
less:
default:
options:
paths: ['_source/styles/']
files:
'site/styles/blog.css': '_source/styles/blog.less'
watch:
jekyll:
files: ['_source/**/*', '!_source/styles/*.less']
tasks: ['build']
less:
files: ['_source/styles/*.less']
tasks: ['less']
concurrent:
dev:
tasks: ['connect', 'watch:jekyll', 'watch:less']
options:
logConcurrentOutput: true
)
grunt.registerTask 'run', ['concurrent:dev']
grunt.registerTask 'build', ['jekyll:build', 'less', 'fix_permissions', 'remove_cdata']
grunt.registerTask 'deploy', ['jekyll:build', 'less', 'fix_permissions', 'remove_cdata', 'minify', 'remove_nbsp', 'rsync']
grunt.registerTask 'deploy:staging', ['jekyll:build', 'less', 'fix_permissions', 'remove_cdata', 'minify', 'remove_nbsp', 'rsync:staging']
grunt.registerTask 'default', ['run']