-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWkfile
41 lines (28 loc) · 1 KB
/
Wkfile
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
'use strict'
const publishTask = wk.extra('publish-task')
const packageTask = wk.extra('package-task')
namespace('test', function() {
task('default', [ 'test:api', 'test:task', 'test:hook' ])
taskProcess('api' , 'mocha test/api.js --color' , { async: true, visible: false })
taskProcess('task', 'mocha test/task.js --color', { async: true, visible: false })
})
packageTask('pkg', function() {
const version = require('./package.json').version
this.name = `workflow-cli-${version}`
this.filelist.include('./bin/**/*')
this.filelist.include('./lib/**/*')
this.filelist.include('./test/**/*')
this.filelist.include('./package.json')
this.filelist.include('./Wkfile')
this.filelist.include('./README.md')
this.targets = [ 'gzip' ]
const self = this
task('publish', { async: true, visible: true }, function() {
wk.exec(`npm publish ${self.getPackagePath()}.tar.gz`)
.catch(this.fail)
.done(this.complete)
})
})
publishTask('deploy', function() {
this.remote = 'origin'
})