-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.ls
63 lines (51 loc) · 1.17 KB
/
gulpfile.ls
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
require! {
"gulp"
"gulp-livescript"
"gulp-uglify"
"gulp-rename"
"gulp-imagemin"
"imagemin-pngcrush"
"gulp-gm"
"gulp-stylus"
"gulp-jade"
"gulp-livereload"
}
gulp.task "js-min" ->
gulp.src "./js/*.ls"
.pipe gulp-livescript bare: false, prelude: true
.pipe gulp-uglify!
.pipe gulp.dest "./js/"
.pipe gulp-rename extname: ".min.js"
.pipe gulp.dest "./js/"
gulp.task "image" ->
gulp.src "./img/*"
.pipe(gulp-imagemin({
optimizationLevel: 6
progressive: true
svgoPlugins: [{removeViewBox: false}]
use: [imagemin-pngcrush!]
}))
.pipe gulp.dest "./dist"
gulp.task "res-image" ->
gulp.src "./img/*"
.pipe gulp-gm ->
it.resize 50
.pipe gulp.dest "smlimg"
gulp.task "js-dev" ->
gulp.src "./js/*.ls"
.pipe gulp-livescript bare: true, prelude: true
.pipe gulp.dest "./js/"
gulp.task "css-dev" ->
gulp.src "./css/*.styl"
.pipe gulp-stylus!
.pipe gulp.dest "./css/"
gulp.task "jd-dev" ->
gulp.src "*.jade"
.pipe gulp-jade!
.pipe gulp.dest "."
gulp.task "watch" ->
gulp.watch "./js/*.ls", ["js-dev"]
gulp.watch "./css/*.styl", ["css-dev"]
gulp.watch "*.jade", ["jd-dev"]
# gulp-livereload.listen!
gulp.task "default" ["watch"]