Function
Static Public Summary | ||
public |
cliWithName(name: string): Provider Generates a |
Static Public
public cliWithName(name: string): Provider source
import {cliWithName} from 'projext-plugin-runner/src/services/cli/cli.js'
Generates a Provider
with an already defined name for the program.
Params:
Name | Type | Attribute | Description |
name | string | The name of the program. |
Example:
// Generate the provider
const provider = cliWithName('my-program');
// Register it on the container
container.register(provider);
// Getting access to the service instance
const cli = container.get('cli');