-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgulpfile.coffee
40 lines (31 loc) · 857 Bytes
/
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
require('coffee-script/register')
gulp = require('gulp')
del = require('del')
coffee = require('gulp-coffee')
bump = require('gulp-bump')
argv = require('yargs')
.alias('b', 'bump')
.default('bump', 'patch')
.describe('bump', 'bump [major|minor|patch|prerelease] version')
.argv
paths =
source:
manifest: ['package.json']
coffee: ['lib_src/*.coffee']
dest:
root: '.'
lib: 'lib'
gulp.task 'clean', ->
del.sync(paths.dest.lib)
gulp.task 'coffee', ->
gulp.src paths.source.coffee
.pipe coffee()
.pipe gulp.dest paths.dest.lib
gulp.task 'build', ['clean', 'coffee']
gulp.task 'default', ['build']
gulp.task 'bump', ['build'], ->
gulp.src paths.source.manifest
.pipe bump { type: argv.bump }
.pipe gulp.dest(paths.dest.root)
gulp.task 'watch', ['build'], ->
gulp.watch paths.source.coffee, ['coffee']