O-tools-node adds a number of standardized command-line utilities to develop Node.JS code bases more effectively:
setup
This command makes a freshly checked out code base runnable and testable.
The default version in this repo checks that the paths are properly set up
and runs npm install
.
If you code base needs other setup steps,
put your own setup
script into its ./bin
folder.
$ setup
lint
Runs all linters. The default script in this repo runs dependency-lint.
$ lint
update-check
Checks whether updates to your dependencies are available.
$ update-check
update
Updates all your dependencies to their latest versions.
$ update
publish
Releases a new version of your product to the world.
$ publish <patch|minor|major>
Installation
- add this module as a development dependency
$ npm i --save-dev o-tools-node
-
make sure your PATH includes
./bin
and./node_modules/.bin
(in this order) -
optionally add these scripts to your code base:
bin/build | builds your project (transpiles to JS, compresses) |
---|---|
bin/spec | runs all tests and linters |
If you develop in LiveScript, use o-tools-livescript for an out-of-the-box solution.
- set up your CI server to automatically publish
new releases from the
release
branch:
- add a
deployment
section similar to the one in this repo to your circle.yml file - go to npmjs.com > User Account > Tokens
- copy an authentication token into the clipboard
- add an environment variable called
AUTH_TOKEN
with the npm auth token as content- On CircleCI this is done by going to: Project Settings > Environment Variables
Development
see our developer documentation