This package has been deprecated

Author message:

This package has been deprecated.Package is no longer supported. Use at your own risk.

@bb-cli/bb-generate

2.6.0 • Public • Published

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-widget

COMMANDS

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 widget

Generate from file system:

  $ bb-generate /path/to/custom/generator

Output to a custom path (default output will be current directory):

  $ bb-generate widget-bb-ng --output /path/to/my/widgets

NAME

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 list

List available generators under bb-cli scope:

  $ bb-generate list -s @backbase

Output list in JSON:

  $ bb-generate list --format json

NAME

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-widget[ng]"
  • bb-generate widget: "generator-widget[default]", 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-123

EXAMPLES

Get a list of options for a given generator:

  $ bb-generate options widget ng

Get a JSON config that can be used in a .bbconfig:

  $ bb-generate options widget ng --json

ENVIRONMENT VARIABLES

Set the amount of log output

LOG_LEVEL=silly|verbose|info|warn|error

Set whether or not to use colors in output

COLOR=false|true

Readme

Keywords

Package Sidebar

Install

npm i @bb-cli/bb-generate

Weekly Downloads

10

Version

2.6.0

License

SEE LICENSE IN LICENSE

Unpacked Size

207 kB

Total Files

31

Last publish

Collaborators

  • backbase-admin
  • bb-cli