@phylum/cli
Phylum cli
Last updated 5 months ago by mpt .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @phylum/cli 
SYNC missed versions from official npm registry.

Pipeline Cli

Usage

npm i @phylum/cli @phylum/pipeline

# Optional global installation:
npm i -g @phylum/cli
# Basic usage:
phylum [[--run] <modulePath>]
  • --run - Specify the entry module that exports the task to run. Default is ./pipeline

Entry module

The entry module must be a commonjs module that exports a task instance as default:

const { Task } = require('@phylum/pipeline');

export.default = new Task(async () => {
	console.log('Hello World!');
});

Arguments

The entry module can also export an array of argument specs for parsing custom command line arguments:

const { config } = require('@phylum/cli');

exports.default = new Task<void>(async t => {
	// Access parsed arguments:
	const {command} = await t.use(config);
	console.log(command.message);
});

exports.args = [
	{name: 'message', alias: 'm', defaultValue: 'Hello World!'}
];
phylum
# => Hello World!

phylum --message "Foo!"
# => Foo!

Current Tags

  • 4.3.0                                ...           latest (5 months ago)

12 Versions

  • 4.3.0                                ...           5 months ago
  • 4.2.3                                ...           6 months ago
  • 4.2.2                                ...           6 months ago
  • 4.2.1                                ...           6 months ago
  • 4.2.0                                ...           6 months ago
  • 4.1.0                                ...           6 months ago
  • 4.0.0                                ...           6 months ago
  • 4.0.0-beta.5                                ...           7 months ago
  • 4.0.0-beta.4                                ...           7 months ago
  • 4.0.0-beta.3                                ...           7 months ago
  • 4.0.0-beta.1                                ...           7 months ago
  • 4.0.0-beta.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 30
Last Day 0
Last Week 0
Last Month 11
Dependencies (8)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |