3.1.8 • Published 3 years ago
pon-task-command v3.1.8
pon-task-command
Pon task to execute commands
Installation
$ npm install pon-task-command --save
Usage
'use strict'
const pon = require('pon')
const { fork } = require('pon-task-command')
async function tryExample () {
let run = pon({
'dev': fork('./bin/app.js', {
env: { DEBUG: 'project:*' }
})
})
run('dev')
}
tryExample()
Signatures
define(cmd, args, options) -> function
Define task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
fork(cmd, args, options) -> function
Forking task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
options.messageHandler | function | Message handler |
spawn(cmd, args, options) -> function
Spawning task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
License
This software is released under the Apache-2.0 License.