-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
53 lines (42 loc) · 1.06 KB
/
gulpfile.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
gulp = require "gulp"
concat = require "gulp-concat"
minifyCSS = require "gulp-minify-css"
rename = require "gulp-rename"
htmlmin = require "gulp-htmlmin"
gulpCssSrc = [
"src/css/normalize.css"
"src/css/base.css"
"src/css/typography.css"
"src/css/meta.css"
"src/css/copy-button.css"
"src/css/clipboard.css"
"src/css/statement.css"
"src/css/util.css"
"src/css/print.css"
]
gulp.task "css", ->
gulp
.src gulpCssSrc
.pipe concat("all.css")
.pipe gulp.dest("./public/css")
.pipe minifyCSS()
.pipe rename("all.min.css")
.pipe gulp.dest("./public/css")
gulpHtmlSrc = "./src/html/*.html"
gulp.task "html", ->
options =
removeComments: true
collapseWhitespace: true
removeAttributeQuotes: true
removeEmptyAttributes: true
minifyJS: true
minifyCSS: true
gulp
.src gulpHtmlSrc
.pipe htmlmin(options)
.pipe gulp.dest("./public")
gulp.task "watch", ->
gulp.watch gulpCssSrc, ["css"]
gulp.watch gulpHtmlSrc, ["html"]
gulp.task "dev", ["css", "html"]
gulp.task "default", ["css", "html", "watch"]