@bb-cli/bb-generate v2.6.0
NAME
bb-generate - Generate packages, modules, items, from specific templates
SYNOPSIS
bb-generate [--help] [-v|--version]
bb-generate item [--help] [-o|--output <path>] [-x|--exclude <items>]
[-s|--scope <scope>] [-f|--format <format>] [-y|--yes] <name>,[template]
bb-generate list [--help] [-s|--scope <scope>] [-f|--format <format>]
bb-generate options [--help] [-s|--scope <scope>] [-f|--format <format>] <name>,[template]DESCRIPTION
Generators are just npm packages that you can install yourself.
By default bb-generate doesn't come with any generators.
OPTIONS
| Option | Description |
|---|---|
| -v, --version | output the version number |
| --help | Output usage information |
EXAMPLES
Install the Backbase 2016 generators:
$ npm install -g @backbase/generator-widgetCOMMANDS
NAME
bb-generate item - Quickly scaffold a new Backbase component from a generator template
SYNOPSIS
bb-generate item [--help] [-o|--output <path>] [-x|--exclude <items>]
[-s|--scope <scope>] [-f|--format <format>] [-y|--yes] <name>,[template]DESCRIPTION
The item will be generated into a directory named the same as the name you give to the item when prompted.
- bb-generate requires that you have already installed Backbase generators, which is most easily done using npm.
- For most generators, the name you give will be automatically turned to snake-case.
OPTIONS
| Option | Description |
|---|---|
| -o, --output <path> | Destination output path. |
| -x, --exclude <items> | Comma separated list of files or folders to be excluded from the template |
| -s, --scope <scope> | Use specific npm scope |
| -f, --format <format> | Output format (supported options: json) |
| -y, --yes | Confirm with yes is the output folder already exists and replace it |
| --help | Output usage information |
EXAMPLES
Generate from installed generator:
$ npm install -g @backbase/generator-widget
$ bb-generate widgetGenerate from file system:
$ bb-generate /path/to/custom/generatorOutput to a custom path (default output will be current directory):
$ bb-generate widget-bb-ng --output /path/to/my/widgetsNAME
bb-generate list - Get a list of the currently installed generators
SYNOPSIS
bb-generate list [--help] [-s|--scope <scope>] [-f|--format <format>]OPTIONS
| Option | Description |
|---|---|
| -s, --scope <scope> | Search within a specific npm scope. |
| -f, --format <format> | Output format (supported options: json) |
| --help | Output usage information |
EXAMPLES
List all available generators:
$ bb-generate listList available generators under bb-cli scope:
$ bb-generate list -s @backbaseOutput list in JSON:
$ bb-generate list --format jsonNAME
bb-generate options - Get a list of options that the given generator requires
SYNOPSIS
bb-generate options [--help] [-s|--scope <scope>] [-f|--format <format>] <name>,[template]OPTIONS
| Option | Description |
|---|---|
| -s, --scope <scope> | Search within a specific npm scope. |
| -f, --format <format> | Output format (supported options: json) |
| --help | Output usage information |
DESCRIPTION
It's possible to get the list of options supported by a generator so that the values
can be provided either in a .bbconfig file, or on the command line. This is useful
when you don't want to be prompted for the values.
CONFIG
Entries can be added to a .bbconfig file in the HOME directory by using a config key
in the format of "generator-%generator-name%%template name%". Some examples of
these config keys are:
- bb-generate widget ng: "generator-widgetng"
- bb-generate widget: "generator-widgetdefault", or "generator-widget"
For example, add the following to the .bbconfig for "bb-generate widget ng"
(added to the "default" profile):
{
"default": {
"generate": {
"item": {
"generator-widget[ng]": {
"name": "widget-123",
"title": "Widget 123",
"description": "Widget 123",
"version": "0.1.0-alpha.0",
"createExtension": true,
"createModel": true,
"backbase6": true
}
}
}
}
}COMMAND LINE DEFAULTS
You can also provide the defaults on the command line (these will overwrite
defaults provided in .bbconfig). All options should be given as generator.%option%.
$ bb-generate widget ng --generator.name widget-123EXAMPLES
Get a list of options for a given generator:
$ bb-generate options widget ngGet a JSON config that can be used in a .bbconfig:
$ bb-generate options widget ng --jsonENVIRONMENT VARIABLES
Set the amount of log output
LOG_LEVEL=silly|verbose|info|warn|errorSet whether or not to use colors in output
COLOR=false|true7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago