igniter
v1.1.0
Published
A framework where you can run identical npm task like linting, testing, publishing across multiple npm projects. Define your own igniter archetype as a package and you can update all the dev dependencies across your projects by just updating the archetype
Downloads
5
Maintainers
Readme
Igniter :fire:
Why
Igniter manages your commonly used task like linting, testing, publishing and common (dev)dependencies across multiple npm packages. Npm is good for running task for each individual package but what if you have 50 react components packages and 20 express plugin packages. Managing the dev dependencies of like mocha, eslint, karma etc and dependencies across all of your packages will probably yield hundreds of combinations of the dependencies versions, directory structures, npm scripts for similar projects. It will be a mess.
Install
npm install -g igniter
Usage
Igniter by itself does not create any boilerplate npm scripts, common dependencies or dev dependencies. What Igniter does is that it runs archetypes. An archetype defines what the common tasks(npm scripts), the common dev dependencies and the common dependencies are for a particular type of project (i.e. either React components or Express middleware)
An archetype basically is another npm package with scripts defined. To install an archetype in your npm package just simply run
i-install <archetype-package-name>
Let's assume that the scripts of package.json of the archetype is as below
"scripts": {
"init": "mkdir src && mkdir lib",
"lint": "eslint --color -c .eslintrc-server lib bin",
"test": "mocha --opts test/server/mocha.opts test/server/spec",
"test-coverage": "istanbul cover --config .istanbul.server.yml _mocha -- --opts test/server/mocha.opts test/server/spec",
"test-all": "i-run test && i-run test-coverage"
}
The authors of the archetypes may specific as many scripts as they want. Once a script defined in an archetype, you can run the script with
i-run <script-name>
As you can see, the archetype author may write scripts to create boilerplate directories, do linting, testing, and test coverage and just about anything.
Cascading scripts
i-run example-script
will use the example-script
defined in node_modules/<archetype-name>/package.json
. However you can overwrite example-script
in your own package.json
since it's sometimes impossible that scripts can be reused across similar packages.
Running scripts
Unlike task runners like gulp and grunt. Igniter only relies on npm, node and shell(i.e. bash) capabilities to run the script. It can run tasks in parallel, timeout a long running task and do anything a shell + node can do.
i.e. Running 2 scripts in parallel
i-run test & i-run test-coverage
Support
Igniter is only tested on the *nix bash environment.
Thanks
Project is inspired by http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/