From f7ccb646c1a0da3e05e83103f7b74a1edfeb2cff Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sat, 19 Sep 2020 16:51:46 +1200 Subject: [PATCH 1/2] Minor grammatical adjustments to readme --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 9b23f4ad..d42914b0 100644 --- a/readme.md +++ b/readme.md @@ -96,7 +96,7 @@ Currently, these are the flags you can configure: - `contents` - Subdirectory to publish (`.` by default). - `releaseDraft` - Open a GitHub release draft after releasing (`true` by default). - `testScript` - Name of npm run script to run tests before publishing (`test` by default). -- `2fa` - Enable 2FA on new packages (`true` by default) (it's not recommended to set this to `false`). +- `2fa` - Enable 2FA on new packages (`true` by default) (it's not recommended setting this to `false`). For example, this configures `np` to never use Yarn and to use `dist` as the subdirectory to publish: @@ -164,7 +164,7 @@ You can also add `np` to a custom script in `package.json`. This can be useful i ### User-defined tests -If you want to run a user-defined test script before publishing instead of the normal `npm test` or `yarn test`, you can use `--test-script` flag or the `testScript` config. This is can be useful when your normal test script is running with a `--watch` mode or in case you want to run some specific tests (maybe on the packaged files) before publishing. +If you want to run a user-defined test script before publishing instead of the normal `npm test` or `yarn test`, you can use `--test-script` flag or the `testScript` config. This can be useful when your normal test script is running with a `--watch` flag or in case you want to run some specific tests (maybe on the packaged files) before publishing. For example, `np --test-script=publish-test` would run the `publish-test` script instead of the default `test`. @@ -201,7 +201,7 @@ $ yarn config set version-sign-git-tag true You can use `np` for packages that aren't publicly published to npm (perhaps installed from a private git repo). -Set `"private": true` in your `package.json` and the publish step will be skipped. All other steps +Set `"private": true` in your `package.json` and the publishing step will be skipped. All other steps including versioning and pushing tags will still be completed. ### Public scoped packages @@ -268,7 +268,7 @@ $ git push --set-upstream origin HEAD $ np patch --any-branch --tag=v1 ``` -### Prerequisite step runs forever on macOS +### The prerequisite step runs forever on macOS If you're using macOS Sierra 10.12.2 or later, your SSH key passphrase is no longer stored into the keychain by default. This may cause the `prerequisite` step to run forever because it prompts for your passphrase in the background. To fix this, add the following lines to your `~/.ssh/config` and run a simple Git command like `git fetch`. From 1c106012474e7490076749e0bf64a5469ac22135 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 24 Sep 2020 09:32:21 +1200 Subject: [PATCH 2/2] Update readme.md Co-authored-by: Sindre Sorhus --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index d42914b0..e9fd386f 100644 --- a/readme.md +++ b/readme.md @@ -96,7 +96,7 @@ Currently, these are the flags you can configure: - `contents` - Subdirectory to publish (`.` by default). - `releaseDraft` - Open a GitHub release draft after releasing (`true` by default). - `testScript` - Name of npm run script to run tests before publishing (`test` by default). -- `2fa` - Enable 2FA on new packages (`true` by default) (it's not recommended setting this to `false`). +- `2fa` - Enable 2FA on new packages (`true` by default) (setting this to `false` is not recommended). For example, this configures `np` to never use Yarn and to use `dist` as the subdirectory to publish: