Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --tag option #46

Merged
merged 2 commits into from
Jul 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ const cli = meow(`
--any-branch Allow publishing from any branch
--skip-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--tag Publish under a given dist-tag

Examples
$ np
$ np patch
$ np 1.0.2
$ np 1.0.2-beta.3 --tag=beta
`);

updateNotifier({pkg: cli.pkg}).notify();
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = (input, opts) => {
},
{
title: 'Publishing package',
task: () => exec('npm', ['publish'])
task: () => exec('npm', ['publish'].concat(opts.tag ? ['--tag', opts.tag] : []))
},
{
title: 'Pushing tags',
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- Reinstalls dependencies to ensure your project works with the latest dependency tree
- Runs the tests
- Bumps the version in package.json and creates a git tag
- Publishes the new version to npm
- Publishes the new version to npm, optionally under a [dist-tag](https://docs.npmjs.com/cli/dist-tag)
- Pushes commits and tags to GitHub


Expand All @@ -35,11 +35,13 @@ $ np --help
--any-branch Allow publishing from any branch
--skip-cleanup Skips cleanup of node_modules
--yolo Skips cleanup and testing
--tag Publish under a given dist-tag

Examples
$ np
$ np major
$ np 1.0.2
$ np 1.0.2-beta.3 --tag=beta
```


Expand Down