Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
senadir authored and youknowriad committed Apr 13, 2020
1 parent e0ecfcf commit 82cead3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ _Example:_
{
"scripts": {
"build": "wp-scripts build",
"changelog": "wp-scripts changelog",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format:js": "wp-scripts format-js",
Expand Down Expand Up @@ -446,6 +447,26 @@ Jest will look for test files with any of the following popular naming conventio

It uses [Jest](https://jestjs.io/) behind the scenes and you are able to use all of its [CLI options](https://jestjs.io/docs/en/cli.html). You can also run `./node_modules/.bin/wp-scripts test:unit --help` or `npm run test:unit:help` (as mentioned above) to view all of the available options. By default, it uses the set of recommended options defined in [@wordpress/jest-preset-default](https://www.npmjs.com/package/@wordpress/jest-preset-default) npm package. You can override them with your own options as described in [Jest documentation](https://jestjs.io/docs/en/configuration). Learn more in the [Advanced Usage](#advanced-usage) section.

### `changelog`

Based on a milestone, it creates a changelog entry with all PRs merged in that milestone.

You will need to have a github api token, [create one here](https://github.com/settings/tokens).

Token scope will require read permissions on public_repo, admin:org, and user.

Export the token as variable called GH_API_TOKEN from your bash profile.

_Example:_

```json
{
"scripts": {
"changelog": "wp-scripts changelog"
}
}
```

## Advanced Usage

In general, this package should be used with the set of recommended config files. While it’s possible to override every single config file provided, if you have to do it, it means that your use case is far more complicated than anticipated. If that happens, it would be better to avoid using the whole abstraction layer and set up your project with full control over tooling used.
Expand Down

0 comments on commit 82cead3

Please sign in to comment.