forked from php-vcr/php-vcr.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
115 lines (104 loc) · 2.26 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
connect:
dev:
options:
hostname: '*'
port: 4000
base: 'build'
sass:
generate:
options:
sourcemap: true
style: 'compressed'
files:
'css/main.css': 'css/main.scss'
copy:
css:
files: [
expand: true
cwd: 'css/'
src: ['main.*'],
dest: 'build/css/'
]
imagemin:
dist:
options:
optimizationLevel: 7
files: [
expand: true # only compressing jpg right now
cwd: 'img/'
src: ['**/*.jpg']
dest: 'img/',
ext: '.jpg'
]
jekyll:
dev:
options: {}
# docco:
# noflo:
# src: ['_src/src/lib/*.coffee']
# options:
# output: 'api/'
# template: '_docco/docco.jst'
shell:
gitclone:
command: 'git clone git://github.com/php-vcr/php-vcr.git _src'
watch:
# php-vcr-api-docs:
# files: [
# '_docco/*.jst'
# ]
# tasks: ['docco']
jekyll:
files: [
'_config.yml'
'index.html'
'**/*.html'
'**/*.md'
'**/*.js'
'**/*.css'
'**/_posts/*.md'
# Ignore the generated files
'!_site/*'
'!_src/*'
'!_site/**/*'
'!_src/**/*'
'!node_modules/**'
'!.git/**'
]
tasks: ['jekyll']
sass:
files: [
'css/*.scss'
]
tasks: ['sass', 'copy']
# siteSass:
# files: [
# 'build/css/*.scss'
# ]
# tasks: ['sass:site', 'copy:site2src']
@loadNpmTasks 'grunt-jekyll'
@loadNpmTasks 'grunt-shell'
@loadNpmTasks 'grunt-contrib-connect'
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-contrib-sass'
@loadNpmTasks 'grunt-contrib-copy'
#@loadNpmTasks 'grunt-contrib-imagemin'
#@registerTask 'img', [
# 'copy:img'
# 'imagemin:dist'
#]
@registerTask 'dev', [
'connect:dev'
'build'
'watch'
]
@registerTask 'build', [
'sass'
'copy'
'jekyll'
]
@registerTask 'default', ['dev']