https://github.com/bendrucker/publicist
Generate and tag a UMD build for release on a separate branch
https://github.com/bendrucker/publicist
Last synced: 11 months ago
JSON representation
Generate and tag a UMD build for release on a separate branch
- Host: GitHub
- URL: https://github.com/bendrucker/publicist
- Owner: bendrucker
- License: mit
- Created: 2014-10-25T16:36:26.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T01:36:29.000Z (about 6 years ago)
- Last Synced: 2025-09-01T02:18:04.353Z (11 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
publicist
========================
publicist generates and tags a UMD build for releases of code that may be used in a browser outside of CommonJS. It automates a workaround for dealing with Bower and other package managers that use Git repositories instead of storing code in a registry like NPM. If you commit your builds to master, you:
* pollute your commit history
* spend time fixing PRs where users commit changes to builds
Publicist avoids these issues by tagging commits on a temporary branch. Read more in [How It Works](#how-it-works)
## Installing
```bash
# globally
$ npm install -g publicist
# locally
$ npm install publicist
```
## Usage
```bash
$ publish
```
You should add `release/` to a `.npmignore` file to ensure that it is not needlessly published to npm.
## How it Works
1. `git checkout master`
2. Update `package.json` and `bower.json` to `version` or increment it by `semver-increment`
3. `git commit` changes with the message `'Release v'`
4. `git checkout` a new `release-*` branch, where `*` is a random string
6. Bundle the `main` file using browserify as standalone (UMD) bundle and output it to a `./release` directory
7. `git commit` the bundle with the message `v UMD Bundle`
8. `git tag` the release commit
9. `git checkout master` and force-delete the temporary release branch
The end result is a tag that points to a commit that no longer sits on a branch, but will remain in the tree.