@bb-cli/bb-config

中文文档
2.2.0发布于 2019/03/06SEE LICENSE IN LICENSECommonJS近 30 天下载 2415

Get bb project or global options

此软件包已被标记为弃用

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

原始使用文档
文档目录12 节
  1. NAME
  2. SYNOPSIS
  3. DESCRIPTION
  4. OPTIONS
  5. EXAMPLES
  6. NAME
  7. SYNOPSIS
  8. DESCRIPTION
  9. EXAMPLE CONFIG
  10. NAMED PROFILES
  11. EXAMPLES
  12. ENVIRONMENT VARIABLES

NAME

bb-config - Get bb project or global options

SYNOPSIS

bb-config [--help] [-v|--version]
bb-config files [--help] [-f|--format <format>]
bb-config list [--help]

DESCRIPTION

To save multiple configurations for use with the bb-cli tools, configuration can be held in .bbconfig files.

When bb-cli commands are run the options are taken from the currently selected configuration.

OPTIONS

OptionDescription
-v, --versionoutput the version number
--helpOutput usage information

COMMANDS

NAME

bb-config files - List the BB CLI configuration files

SYNOPSIS

bb-config files [--help] [-f|--format <format>]

DESCRIPTION

The .bbconfig file is obtained by merging multiple configurations by this order of importance:

  • Local file: .bbconfig located in the current working directory - not parent directories
  • Global: .bbconfig file located in user’s home folder (~)

OPTIONS

OptionDescription
-f, --format <format>Output format (supported options: json)
--helpOutput usage information

EXAMPLES

List configuration files:

  $ bb-config files

NAME

bb-config list - List the BB CLI configuration data

SYNOPSIS

bb-config list [--help]

DESCRIPTION

This command will show you the current configuration data in JSON format.

The configuration is obtained by merging the global and local configuration files (see bb-config-files).

The configuration file is a JSON formatted file with root key names corresponding to profiles.

CLI commands sections can be added, and those options will only apply to those commands. Within a command section you can also add a sub-command section, and those options will only apply to the sub-commands.

EXAMPLE CONFIG

In this example, the command "bb-serve project" will load the port and plugins options. But the command "bb-serve foo" would only load the "port" option. Both commands would load the "portal-host" and "portal-port" properties.

{
  "default": {
    "portal-host": "my.portal.com",
    "portal-port": 80
  },
  "dev": {
    "portal-host": "192.168.99.100",
    "portal-port": 8080,
    "serve": {
      "port": 80,
      "project": {
        "plugins": "sass"
      }
     }
  }
}

NAMED PROFILES

The BB CLI supports named profiles stored in the config file. You can configure additional profiles by adding entries to the config file. By default all config values will be take from the 'default' profile.

To use a named profile set the BB_PROFILE environment variable at the command line.

EXAMPLES

List current configuration for default profile:

  $ bb-config list

List configuration for dev profile:

  $ BB_PROFILE=dev bb-config list

ENVIRONMENT VARIABLES

The profile which will be used by all CLIs when loading the config

BB_PROFILE=default

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

版本与发布记录

@bb-cli/bb-config 共发布 7 个版本,首次发布于 2017/02/28;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.2.0latest2019/03/067 年前
2.1.02017/11/178 年前
2.0.32017/10/119 年前
2.0.22017/09/219 年前
2.0.12017/03/109 年前
2.0.02017/03/079 年前

关于 @bb-cli/bb-config 的常见问题

@bb-cli/bb-config 是什么?

Get bb project or global options注意:该包已被作者标记为弃用——This package has been deprecated.Package is no longer supported. Use at your own risk.

如何安装 @bb-cli/bb-config?

在项目目录运行 npm install @bb-cli/bb-config,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bb-config,可以用 npx bb-config 直接运行。

@bb-cli/bb-config 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bb-cli__bb-config 是否存在。

@bb-cli/bb-config 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bb-cli/bb-config 可以商用吗?

@bb-cli/bb-config 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@bb-cli/bb-config 的下载量有多少?

根据 npm 官方下载统计,@bb-cli/bb-config 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,415 次,日均约 81 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bb-cli/bb-config 还在维护吗?

最新版本 2.2.0 发布于 2019/03/06(7 年前);至今共发布 7 个版本,其中过去 12 个月发布了 0 个;首次发布于 2017/02/28。作者已将其标记为弃用,新项目建议寻找替代方案。