https://github.com/turbo87/auto-dist-tag
Automatically rewrites the "publishConfig.tag" setting in your "package.json" file for you
https://github.com/turbo87/auto-dist-tag
Last synced: about 1 year ago
JSON representation
Automatically rewrites the "publishConfig.tag" setting in your "package.json" file for you
- Host: GitHub
- URL: https://github.com/turbo87/auto-dist-tag
- Owner: Turbo87
- License: apache-2.0
- Created: 2017-05-02T13:36:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T23:31:43.000Z (about 1 year ago)
- Last Synced: 2025-04-13T02:09:55.648Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.64 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
auto-dist-tag
===============================================================================
[](https://travis-ci.org/Turbo87/auto-dist-tag)
[](https://www.npmjs.com/package/auto-dist-tag)
> Automatically rewrites the `publishConfig.tag` setting in your
> `package.json` file for you
Install
-------------------------------------------------------------------------------
```
npm install --global auto-dist-tag
```
Usage
-------------------------------------------------------------------------------
```
$ auto-dist-tag --help
Usage
$ auto-dist-tag [path]
Options
--write, -w Write calculated dist-tag to the package.json file
```
`auto-dist-tag` will automatically figure out what the best
[`dist-tag`](https://docs.npmjs.com/cli/dist-tag) is based on the `version`
property in your `package.json` file and the previously published versions
unless you explicitly specify a tag yourself.
Have a look at our [tests](test/calc-dist-tag-test.js) to figure out what
tags to expect as output.
### Travis CI
If you are using [Travis CI](https://docs.travis-ci.com/user/deployment/npm/)
to automatically publish your package to npm you should add the following
snippet to your `.travis.yml` file:
```yaml
before_deploy:
- npm install -g auto-dist-tag@1
- auto-dist-tag --write
deploy:
skip_cleanup: true
...
```
License
-------------------------------------------------------------------------------
This project is licensed under the [Apache License 2.0](LICENSE).