@beemo/dev

中文文档
2.1.2发布于 2022/07/24MITTypeScriptCommonJS近 30 天下载 3188

Official Beemo configuration module for modern local development.

原始使用文档
文档目录10 节
  1. Requirements
  2. Setup
  3. Settings
  4. Overrides
  5. Drivers
  6. Scaffolds
  7. project/dotfiles
  8. project/github
  9. project/package
  10. workspace/package

Beemo - Development configuration module

Build Status npm version npm deps

An official TypeScript-only "batteries included" Beemo configuration module that provides pre-packaged configs for the Babel, ESLint, Jest, Prettier, and TypeScript drivers and developer tools.

yarn install --dev @beemo/dev

Requirements

  • Source files are in a folder called src.
  • Tests files are in a folder called tests relative to source, or __tests__ within source.
  • Declaration/types files are in a folder called types relative to source.
  • Custom TypeScript paths should start with : instead of @ to avoid NPM supply chain attacks.

Setup

Create a .config/beemo.ts file in the root of your project that configures @beemo/dev as the configuration module. Be sure to enable all drivers and any settings.

// .config/beemo.ts
export default {
    module: '@beemo/dev',
    drivers: ['babel', 'eslint', 'jest', 'prettier', 'typescript'],
    settings: {},
};

Settings

The following Beemo settings can be defined and will be passed to applicable drivers.

  • decorators (boolean) - Enable decorators for Babel and TypeScript drivers. Defaults to false.
  • esm (boolean) - Enable ECMAScript module "mode" for tools that support it (Babel, Jest, etc).
  • node (boolean) - Current project will target Node.js instead of the browser. Defaults to false.
  • projects (boolean | string[]) - Enable Jest projects. If true is passed, will be resolved using workspaces, otherwise requires an array of explicit strings. Defaults to false.
  • react (boolean | classic | automatic) - Enable React and JSX support for all drivers. Defaults to false.

Overrides

If you would like to override a driver config, create a .config/beemo/<driver>.ts file in the root of the project. View the official Beemo docs for more information.

// .config/beemo/eslint.ts
export default {
    rules: {
        'no-param-reassign': 'off',
    },
};

Drivers

The following drivers are directly supported in this configuration module, and automatically passed common command line options when being ran.

  • Babel
    • Always passes --copy-files.
    • Sets --extensions to all JS/TS extensions.
    • If no out provided, defaults to src/ --out-dir lib/.
  • ESLint
    • Always passes --cache --color --fix.
    • Sets --extensions to all JS/TS extensions.
    • If no target provided, defaults to linting src/ tests/.
    • If using workspaces, will target the above in each package.
    • Generates Prettier and TypeScript configs when enabled.
  • Jest
    • Always passes --colors --logHeapUsage.
    • Sets NODE_ENV=test and TZ=UTC.
    • Generates a Babel config when enabled.
    • Supports projects through the projects setting.
  • Prettier
    • If no args provided, defaults to --write ..
    • Provides a default ignore list of common files.
  • TypeScript
    • Modern/next ECMAScript support.
    • Type-checking only.

Please refer to their documentation for more information on how each one is configured.

Scaffolds

Once your project has been configured to use Beemo, you can scaffold specific files using our built-in templates.

project/dotfiles

Will scaffold common dotfiles like .gitignore.

beemo scaffold project dotfiles

project/github

Will scaffold GitHub repository workflow files to .github. Supports the following workflows:

  • build - Builds, tests, lints, and type checks the project on each pull request and master merge. Also verifies Packemon packing and Docusaurus building passes.
  • deploy - Deploys a Docusaurus website on each master commit. Requires GH_USER and GH_PAGES_DEPLOY secrets.
  • pr - Validates a pull request title using the conventional-changelog-beemo preset.
beemo scaffold project github

project/package

Will append fields to the root package.json.

  • Adds scripts for common actions like building, linting, testing, etc.
  • When passed --workspaces, sets private and workspaces to packages/*.
beemo scaffold project package

workspace/package

Will scaffold a new package into a packages workspace. Creates CHANGELOG.md, README.md, LICENSE, and package.json files.

beemo scaffold workspace package --owner milesj --repo aesthetic framework

版本与发布记录

@beemo/dev 共发布 51 个版本,首次发布于 2021/04/20;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.1.2latest2022/07/244 年前
2.1.12022/05/304 年前
2.1.02022/05/304 年前
2.0.02022/05/284 年前
1.7.132022/04/264 年前
1.7.122022/04/204 年前

其他发布通道:next → 0.0.1-alpha.4。

关于 @beemo/dev 的常见问题

@beemo/dev 是什么?

Official Beemo configuration module for modern local development.

如何安装 @beemo/dev?

在项目目录运行 npm install @beemo/dev,或使用 pnpm add / yarn add / bun add。

@beemo/dev 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@beemo/dev 支持 ESM 还是 CommonJS?

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

@beemo/dev 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14.15.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@beemo/dev 可以商用吗?

@beemo/dev 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@beemo/dev 的下载量有多少?

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

@beemo/dev 还在维护吗?

最新版本 2.1.2 发布于 2022/07/24(4 年前);至今共发布 51 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/04/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。