0.1.4 • Published 8 years ago

base-task-alias v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

base-task-alias npmjs.com The MIT License npm downloads

Plugin that adds .taskAlias method to your @node-base application. Creating alias task for some task.

code climate standard code style travis build status coverage status dependency status

Install

npm i base-task-alias --save

Usage

For more use-cases see the tests

const baseTaskAlias = require('base-task-alias')

baseTaskAlias

Adds .taskAlias method that accept name and aliases. It creates task using the .task method for each item in aliases array, which task will point to name task.

Params

  • options {Object}: object to merge with app.options
  • returns {Function}: plugin executed by .use method

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 aliases pointing to name as dependency.

Params

  • name {String}: task name to which each alias will point
  • opts {Object|Array}: options passed to .task or array of aliases
  • aliases {Array|String}: list of alias task names
  • returns {Object}: return this instance 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

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.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckoCore.tk keybase tunnckoCore tunnckoCore npm tunnckoCore twitter tunnckoCore github