@phylum/cli
Phylum cli
Last updated 3 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
# Basic usage:
npx 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!'}
];
npx phylum
# => Hello World!

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

Current Tags

  • 4.2.3                                ...           latest (3 months ago)

11 Versions

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

Copyright 2014 - 2016 © taobao.org |