Package Exports
- toolsmith
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (toolsmith) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Toolsmith
Yet another CLI tool framework.
Installation
npm install toolsmithBasic Example
#!/usr/bin/env node
const command = require("toolsmith")
command()
.option('foo')
.parameter('bar')
.handler((ctx, args, opts) => {
if (opts.foo) {
ctx.log('foo is enabled')
}
ctx.log('bar says ' + bar)
});$ ./example.js --foo hello
foo is enabled
bar says hello
$ ./example.js --help
Usage: example.js [OPTIONS...] <bar>
Parameters:
bar
Options:
-h,--help You are here.
-f,--foo