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
Installing
# globally $ npm install -g publicist# locally $ npm install publicist
Usage
$ publish <version | semver-increment>
You should add release/
to a .npmignore
file to ensure that it is not needlessly published to npm.
How it Works
git checkout master
- Update
package.json
andbower.json
toversion
or increment it bysemver-increment
git commit
changes with the message'Release v<version>'
git checkout
a newrelease-*
branch, where*
is a random string- Bundle the
main
file using browserify as standalone (UMD) bundle and output it to a./release
directory git commit
the bundle with the messagev<version> UMD Bundle
git tag
the release commitgit 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.