pon-task-command

3.1.8 • Public • Published

pon-task-command

Build Status npm Version JS Standard

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.

Links

Readme

Keywords

Package Sidebar

Install

npm i pon-task-command

Weekly Downloads

3

Version

3.1.8

License

Apache-2.0

Unpacked Size

48.9 kB

Total Files

37

Last publish

Collaborators

  • realglobe