1 | # npub
|
2 |
|
3 | This is a publishing tool
|
4 | for Node.js projects
|
5 | hosted in a git repository.
|
6 |
|
7 | It makes use of the existing `publishConfig` section
|
8 | of a project's package.json.
|
9 |
|
10 | It is currently not fit for external use.
|
11 | Please wait for 1.0.0 before relying on this tool.
|
12 |
|
13 | ## prep command
|
14 |
|
15 | `npub prep`
|
16 |
|
17 | 1. if no LICENSE file exists in the current directory, abort
|
18 | 1. get a list of all .js/.coffee files recursively in the current directory, excluding those in `publishConfig.license.exclude` (and `./node_modules`)
|
19 | 1. for each file, ensure the LICENSE content is in a header comment
|
20 |
|
21 | ## publish command
|
22 |
|
23 | `npub version 1.2.3`
|
24 |
|
25 | Options:
|
26 | * `-t/--test command` - alternate test suite command. default: `npm test`
|
27 |
|
28 | 1. Runs `npub verify`
|
29 | 1. Runs `npub prep`
|
30 | 1. Runs `npub verify`
|
31 | 1. run the test suite
|
32 | 1. build temp changelog based on commits since last version bump
|
33 | 1. open editor with temp changelog
|
34 | 1. if exit code is non-zero, abort
|
35 | 1. set package version to whatever was specified
|
36 | 1. commit changes (changelog and package.json update) with message "v1.2.3"
|
37 | 1. tag commit as v1.2.3
|
38 | 1. confirm "about to publish", otherwise abort
|
39 | 1. npm publish
|
40 | 1. git push
|
41 | 1. git push --tags
|
42 | 1. npm publish
|
43 |
|
44 | # verify command
|
45 |
|
46 | `npub verify`
|
47 |
|
48 | 1. if git status is clean exit with 0, otherwise exit with a status of 2
|
49 |
|
50 | ## todo
|
51 |
|
52 | * optionally provide github access to interact with pull requests and releases
|
53 | * update tag with release notes of this change's changelog
|
54 | * comment on all PRs associated with this version with a link to the release notes
|
55 |
|
56 | # license
|
57 |
|
58 | [MIT](LICENSE)
|
59 |
|