2.6.0 • Published 5 years ago

@bb-cli/bb-generate v2.6.0

Weekly downloads
255
License
SEE LICENSE IN LI...
Repository
-
Last release
5 years ago

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

OptionDescription
-v, --versionoutput the version number
--helpOutput 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

OptionDescription
-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, --yesConfirm with yes is the output folder already exists and replace it
--helpOutput 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

OptionDescription
-s, --scope <scope>Search within a specific npm scope.
-f, --format <format>Output format (supported options: json)
--helpOutput 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

OptionDescription
-s, --scope <scope>Search within a specific npm scope.
-f, --format <format>Output format (supported options: json)
--helpOutput 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-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
2.6.0

5 years ago

2.5.4

5 years ago

2.5.3

5 years ago

2.5.2

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.2

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.3-rc.1

7 years ago

2.0.3-rc.0

7 years ago

2.0.2

7 years ago

2.0.2-pr.0

8 years ago

2.0.1

8 years ago

2.0.1-pr.3

8 years ago

2.0.1-pr.2

8 years ago

2.0.1-pr.1

8 years ago

2.0.0

8 years ago

2.0.0-rc.2

8 years ago

2.0.0-pr.0

8 years ago

2.0.0-rc.1

8 years ago

2.0.0-rc.0

8 years ago

2.0.0-pr.10

8 years ago

2.0.0-pr.9

8 years ago

2.0.0-pr.8

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago