forked from fukayatsu/lttm-crx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
44 lines (36 loc) · 1.08 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
gulp = require 'gulp'
coffee = require 'gulp-coffee'
sass = require 'gulp-sass'
clean = require 'gulp-clean'
zip = require 'gulp-zip'
runSequence = require 'run-sequence'
paths =
lib: 'lib/**/*.*'
js: 'src/js/**/*.coffee'
css: 'src/css/**/*.scss'
gulp.task 'copy', ->
gulp.src(paths.lib)
.pipe(gulp.dest('build/'))
gulp.task 'coffee', ->
gulp.src(paths.js)
.pipe(coffee())
.pipe(gulp.dest('build/js/'))
gulp.task 'sass', ->
gulp.src(paths.css)
.pipe(sass())
.pipe(gulp.dest('build/css/'))
gulp.task 'watch', ->
gulp.watch paths.lib, ['copy']
gulp.watch paths.js, ['coffee']
gulp.watch paths.css, ['sass']
gulp.task 'clean', ->
gulp.src(['build', 'build.zip'], { read: false })
.pipe(clean())
gulp.task 'zip', ->
gulp.src('build/**/*.*')
.pipe(zip('build.zip'))
.pipe(gulp.dest('./'))
gulp.task 'build', ['copy', 'coffee', 'sass']
gulp.task 'rebuild', -> runSequence('clean', 'build')
gulp.task 'release', -> runSequence('clean', 'build', 'zip')
gulp.task 'default', -> runSequence('clean', 'build', 'watch')