Pon task to execute commands
$ npm install pon-task-command --save
'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()
Define task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
Forking task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
options.messageHandler | function | Message handler |
Spawning task
Param | type | Description |
---|---|---|
cmd | string | Command to execute |
args | string[] | Command arguments |
options | Object | Optional settings |
This software is released under the Apache-2.0 License.