Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Latest commit

 

History

History

README.md

VersionPress dev scripts

Scripts that have outgrown the one-liners in package.json.

Dev setup

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

Debugging scripts

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.

About the changelog script

The script is used when preparing a release.

How to use it:

  1. Create a new personal access token on GitHub. It only needs the public_repo scope.
  2. Copy .env.example to .env and put the token there.
  3. 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.