@posix/px

0.2.0 • Public • Published

px banner

Posix cross platform npm scripts.

Write your npm scripts using posix bash syntax, cross platform

travis ci npm version appveyor ci

Features

Command sequences

Execute a set of command serially

command1; command2; command3;

Logical or

Execute commandB only if execution of commandA fail (exit code <> 0)

command1 || command2

Logical and

Execute commandB only if execution of commandA succeed (exit code = 0)

command1 && command2

Setting environment variables

Set an environment variable (could replace the use of cross-env)

DEBUG=cmd cmd

Asynchronous execution of a process

Run cmd1, cmd2 and cmd3 in parallel

cmd1 & cmd2 & cmd3

Usage

  1. Install px:
$ npm i @posix/px --save-dev
  1. Add a line to your project .npmrc file to configure the script-shell config:
script-shell = "px"

on windows you shall use px.cmd:

px.cmd

The setup process above will be automated using a px --init command.

See Also

License

MIT - © 2017 Andrea Parodi

Readme

Keywords

none

Package Sidebar

Install

npm i @posix/px

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • parroit