1 | 'use strict'
|
2 |
|
3 | Args = require 'args-js'
|
4 |
|
5 | module.exports =
|
6 |
|
7 | scaffold: ->
|
8 | return {
|
9 | files: []
|
10 | plugins:
|
11 | prerelease: {}
|
12 | postrelease: {}
|
13 | }
|
14 |
|
15 |
|
16 | plugins: (files) ->
|
17 | return {
|
18 | prerelease:
|
19 | 'Linting config files':
|
20 | plugin: 'bumped-finepack'
|
21 | postrelease:
|
22 | 'Generating CHANGELOG file':
|
23 | plugin: 'bumped-changelog'
|
24 | 'Committing new version':
|
25 | plugin: 'bumped-terminal'
|
26 | command: 'git add CHANGELOG.md ' + files.join(' ') + ' && git commit -m "Release $newVersion"'
|
27 | 'Detecting problems before publish':
|
28 | plugin: 'bumped-terminal'
|
29 | command: 'git-dirty && npm test'
|
30 | 'Publishing tag to GitHub':
|
31 | plugin: 'bumped-terminal'
|
32 | command: 'git tag $newVersion && git push && git push --tags'
|
33 | 'Publishing to NPM':
|
34 | plugin: 'bumped-terminal'
|
35 | command: 'npm publish'
|
36 | }
|
37 |
|
38 | keywords:
|
39 | semver: ['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']
|
40 | nature: ['breaking', 'feature', 'fix']
|
41 | adapter:
|
42 | breaking: 'major'
|
43 | feature: 'minor'
|
44 | fix: 'patch'
|
45 |
|
46 | detectFileNames: ['package.json']
|
47 | fallbackFileName: 'package.json'
|
48 |
|
49 | logger:
|
50 | keyword: 'bumped'
|
51 | level: 'all'
|
52 | types:
|
53 | error:
|
54 | level : 0
|
55 | color : ['red']
|
56 | warn:
|
57 | level : 1
|
58 | color : ['yellow']
|
59 | success:
|
60 | level : 2
|
61 | color : ['green']
|
62 |
|
63 | args: ->
|
64 | args = Args([
|
65 | { opts : Args.OBJECT | Args.Optional }
|
66 | { cb : Args.FUNCTION | Args.Required }
|
67 | ], arguments[0])
|
68 | return [args.opts, args.cb]
|