0.1.4 • Published 9 years ago
base-task-alias v0.1.4
base-task-alias

Plugin that adds
.taskAliasmethod to your @node-base application. Creating alias task for some task.
Install
npm i base-task-alias --saveUsage
For more use-cases see the tests
const baseTaskAlias = require('base-task-alias')baseTaskAlias
Adds
.taskAliasmethod that acceptnameandaliases. It creates task using the.taskmethod for each item inaliasesarray, which task will point tonametask.
Params
options{Object}: object to merge withapp.optionsreturns{Function}: plugin executed by.usemethod
Example
var tasks = require('base-task')
var taskAlias = require('base-task-alias')
var Base = require('base')
var app = new Base()
app.use(tasks()).use(taskAlias()).taskAlias
Creates task for each item in
aliasespointing tonameas dependency.
Params
name{String}: task name to which each alias will pointopts{Object|Array}: options passed to.taskor array ofaliasesaliases{Array|String}: list of alias task namesreturns{Object}: returnthisinstance for chaining
Example
app.use(taskAlias())
app.taskAlias('foo', ['bar', 'qux'])
app.task('foo', function () {
console.log('task: foo')
})
app.build('foo') // => 'task: foo'
app.build('bar') // => 'task: foo'
app.build('qux') // => 'task: foo'Related
- base-plugins-enhanced: Error handling and extras for
.useand.runmethods of your Base… more | homepage - base-plugins: Upgrade's plugin support in base applications to allow plugins to be called… more | homepage
- base-task: base plugin that provides a very thin wrapper around https://github.com/doowb/composer for adding… more | homepage
- base: base is the foundation for creating modular, unit testable and highly pluggable… more | homepage
- generate: Command line tool and developer framework for scaffolding out new GitHub projects… more | homepage
- verb-generate-readme: Generate your project's readme with verb. Requires verb v0.9.0 or higher. | homepage
- verb: Documentation generator for GitHub projects. Verb is extremely powerful, easy to use… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.