4.3.0 • Published 6 years ago
@phylum/cli v4.3.0
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!4.3.0
6 years ago
4.2.3
7 years ago
4.2.2
7 years ago
4.2.1
7 years ago
4.2.0
7 years ago
4.1.0
7 years ago
4.0.0
7 years ago
4.0.0-beta.5
7 years ago
4.0.0-beta.4
7 years ago
4.0.0-beta.3
7 years ago
4.0.0-beta.1
7 years ago
4.0.0-beta.0
7 years ago