Scripts that have outgrown the one-liners in package.json.
npm install is run as part of root's post-install script so you should be fine.
Scripts can be run during development like this:
node -r ts-node/register build.ts
The repo-root package.json scripts then call them like this:
node -r ./scripts/node_modules/ts-node/register scripts/build.ts
Use a npm run debug-script -- ... or manually add --inspect-brk:
node -r ts-node/register --inspect-brk build.ts
In VSCode, use the "Node attach" configuration.
The script is used when preparing a release.
How to use it:
- Create a new personal access token on GitHub. It only needs the
public_reposcope. - Copy
.env.exampleto.envand put the token there. - Run the tool like this:
npm run changelog -- 4.0-beta..master
The CLI output is directly paste-able to GitHub issues, however, if you want to paste it to a Markdown document (e.g., release notes), add the --format flag:
npm run changelog -- --format markdown 4.0-beta..master | pbcopy
This will convert strings like #123 to [#123](https://github.com/versionpress/versionpress/issues/123), will handle newlines etc.