@bb-cli/bb-mobile

中文文档
2.0.1-pr.9发布于 2019/11/14SEE LICENSE IN LICENSECommonJS近 30 天下载 1890

Get bb project or global options

原始使用文档
文档目录18 节
  1. NAME
  2. SYNOPSIS
  3. DESCRIPTION
  4. OPTIONS
  5. ARGUMENTS
  6. EXAMPLES
  7. NAME
  8. SYNOPSIS
  9. DESCRIPTION
  10. OPTIONS
  11. ARGUMENTS
  12. EXAMPLES
  13. NAME
  14. SYNOPSIS
  15. DESCRIPTION
  16. OPTIONS
  17. ARGUMENTS
  18. EXAMPLES

NAME

bb-mobile - Get bb project or global options

SYNOPSIS

bb-mobile [--help] [-v|--version]
bb-mobile encrypt [--help] [-a|--hashassets] [-b|--buildvariant <buildvariantname>]
    [-d|--directory <path>] <platform>,<configuration>
bb-mobile upgrade-conf [--help] [-s|--source <version>] [-t|--target <version>]
    [-o|--output <path>] <configuration>
bb-mobile upgrade-model [--help] [-s|--source <version>] [-t|--target <version>]
    [-o|--output <path>] <model>

DESCRIPTION

To execute commands related to the mobile application development.

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-mobile encrypt - Encrypt a configuration file

SYNOPSIS

bb-mobile encrypt [--help] [-a|--hashassets] [-b|--buildvariant <buildvariantname>]
    [-d|--directory <path>] <platform>,<configuration>

DESCRIPTION

To encrypt a configuration file during building time. Optionally, hashes from the assets can be calculated and added to the encrypted configuration to be used as part of the Runtime Integrity Check feature of the SDK.

OPTIONS

OptionDescription
-a, --hashassetsGenerates the hashes of the assets for runtime checks
-b, --buildvariant <buildvariantname>(Android only) consider all
the paths specific to this build variant when hashing assets
-d, --directory <path>Search path for the assets to be hashed. In android,
the following path will be appended to the given : /app/src/main/assets
--helpOutput usage information

ARGUMENTS

platform Platform to be encrypt the configuration (supported platforms: android, ios)

configuration Path to the configuration file to be encrypted.

EXAMPLES

In order to encrypt a configuration file you can use:

For Android:

  bb-mobile encrypt android app/src/main/assets/config.json

or for iOS:

  bb-mobile encrypt ios assets/config.json

If you want to enable the Runtime Integrity Check you can add the -a or --hashassets flag.

For Android:

  bb-mobile encrypt android app/src/main/assets/config.json -a

or

  bb-mobile encrypt android app/src/main/assets/config.json --hashassets

For iOS:

  bb-mobile encrypt ios assets/config.json -a

or

  bb-mobile encrypt ios assets/config.json --hashassets

NAME

bb-mobile upgrade-conf - Upgrade configuration file from 1.x format to 2.x or 3.x format

SYNOPSIS

bb-mobile upgrade-conf [--help] [-s|--source <version>] [-t|--target <version>]
    [-o|--output <path>] <configuration>

DESCRIPTION

To upgrade an application configuration file to a newer configuration format required by a specific Mobile SDK version.

OPTIONS

OptionDescription
-s, --source <version>Source version to upgrade from
-t, --target <version>Target version to upgrade to
-o, --output <path>Output path for the upgraded configuration.
If none is provided the upgraded configuration will be output in the standard output (stdout)
--helpOutput usage information

ARGUMENTS

configuration Path to the configuration file to be upgraded.

EXAMPLES

In order to upgrade a configuration file you can use:

  bb-mobile upgrade-conf app/src/main/assets/config.json -o app/src/main/assets/config-3.json

If you want to simply preview the upgraded result, you can omit the --output parameter and the result will be displayed on the standard output

  bb-mobile upgrade-conf app/src/main/assets/config.json

If you want to migrate a configuration from version 1 to version 3, you can use:

  bb-mobile upgrade-conf app/src/main/assets/config.json -s 1 -t 3 -o config-3.json

or, omit the target version as 3 is the default.

  bb-mobile upgrade-conf app/src/main/assets/config.json -s 1 -o config-3.json

If you want to migrate a configuration from version 2 to version 3, you can use:

  bb-mobile upgrade-conf app/src/main/assets/config.json -t 3 -o config-3.json

The -s 2 flag can be omitted as 2 is the default source version.

NAME

bb-mobile upgrade-model - Upgrade model file (local model) from 1.x format to 2.x or 3.4 format (mobile optimized)

SYNOPSIS

bb-mobile upgrade-model [--help] [-s|--source <version>] [-t|--target <version>]
    [-o|--output <path>] <model>

DESCRIPTION

To upgrade an application model file to a newer model format required by a specific Mobile SDK version.

OPTIONS

OptionDescription
-s, --source <version>Source version to upgrade from
-t, --target <version>Target version to upgrade to
-o, --output <path>Output path for the upgraded model.
If none is provided the upgraded model will be output in the standard output (stdout)
--helpOutput usage information

ARGUMENTS

model Path to the local model file to be upgraded.

EXAMPLES

In order to upgrade a local model file you can use:

  bb-mobile upgrade-model app/src/main/assets/local_model.json -o app/src/main/assets/local_model-3.json

If you want to simply preview the upgraded result, you can omit the --output parameter and the result will be displayed on the standard output

  bb-mobile upgrade-model app/src/main/assets/local_model.json

If you want to migrate a local model from version 1 to version 3.4, you can use:

  bb-mobile upgrade-model app/src/main/assets/local_model.json -s 1 -t 3.4 -o local_model-3.json

or, omit the target version as 3.4 is the default.

  bb-mobile upgrade-model app/src/main/assets/local_model.json -s 1 -o local_model-3.json

If you want to migrate a local model from version 2 to version 3.4, you can use:

  bb-mobile upgrade-model app/src/main/assets/local_model.json -t 3.4 -o local_model-3.json

The -s 2 flag can be omitted as 2 is the default source version.

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-mobile 共发布 11 个版本,首次发布于 2018/01/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.1-pr.9latest2019/11/146 年前
2.0.1-pr.82019/11/136 年前
2.0.1-pr.72019/10/317 年前
2.0.1-pr.62019/04/267 年前
2.0.1-pr.52019/04/107 年前
2.0.1-pr.42019/03/227 年前

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

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

Get bb project or global options

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

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

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

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

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

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

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

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

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

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

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

最新版本 2.0.1-pr.9 发布于 2019/11/14(6 年前);至今共发布 11 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/01/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。