JavaScript task tool, similar to Jake, Make or Rake
npm install jsmakemakefile.js.
package.json.
npm install jsmake -g to install jsmake on your system.
makefile.js needs to be created at the root of your codebase.
makefile.js look like:
js
jsmake.desc('Says hi to someone.');
jsmake.task('hello', function (argv) {
console.log('hi ' + argv.name);
});
`
Other samples can be found in samples/ folder, such as:
- Alternative syntax
- API
- Async/Promises
- Events
- NPM Utils
- Pre/Post Tasks
- Sequential Tasks
- Shell Commands
- Tasks with Descriptions
- Tasks with Parameters
- Using with gulp.js
$3
Running jsmake command will execute the task named default. If there is no task defined as default, jsmake will display the help message.
Help content consists of usage of jsmake, the list of declared tasks and their parameters and descriptions. These information also can be displayed with jsmake -h command.
Help output of jsmake's own makefile.js is shown below:
`bash
$ jsmake -h
Usage: jsmake [command] [parameters]
Parameters:
--makefile FILE, -f Load tasks from FILE
--tasks, -t Lists defined tasks
--verbosity Sets verbosity of log messages [debug, warn, info, error]
--version, -v Displays the jsmake version
--help, -h, -? Displays this help message
Tasks Description
------------------------------- -----------------------------------
bump Bumps the package version for next release.
Parameters:
--type Increment type [major, minor, patch, premajor, preminor, prepatch or prerelease]
publish Publishes package to npm.
deps Reinstalls dependencies from npm.
build Builds the source code.
``