Skip to content

realglobe-Inc/pon-task-command

Repository files navigation

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

Releases

No releases published

Packages

No packages published