UNPKG

1.54 kBMarkdownView Raw
1# npub
2
3This is a publishing tool
4for Node.js projects
5hosted in a git repository.
6
7It makes use of the existing `publishConfig` section
8of a project's package.json.
9
10It is currently not fit for external use.
11Please wait for 1.0.0 before relying on this tool.
12
13## prep command
14
15`npub prep`
16
171. if no LICENSE file exists in the current directory, abort
181. get a list of all .js/.coffee files recursively in the current directory, excluding those in `publishConfig.license.exclude` (and `./node_modules`)
191. for each file, ensure the LICENSE content is in a header comment
20
21## publish command
22
23`npub version 1.2.3`
24
25Options:
26* `-t/--test command` - alternate test suite command. default: `npm test`
27
281. Runs `npub verify`
291. Runs `npub prep`
301. Runs `npub verify`
311. run the test suite
321. build temp changelog based on commits since last version bump
331. open editor with temp changelog
341. if exit code is non-zero, abort
351. set package version to whatever was specified
361. commit changes (changelog and package.json update) with message "v1.2.3"
371. tag commit as v1.2.3
381. confirm "about to publish", otherwise abort
391. npm publish
401. git push
411. git push --tags
421. npm publish
43
44# verify command
45
46`npub verify`
47
481. 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