@bardioc/create-bardioc-app

中文文档
0.7.6发布于 2026/11/04MITES Module零依赖近 30 天下载 1902

Scaffold a Bardioc app with framework templates (vite, react, vue, angular, svelte, solid, preact, nextjs)

原始使用文档
文档目录10 节
  1. Requirements
  2. Install
  3. Quick start
  4. Generated app
  5. Release infra (out of the box)
  6. Opt-in tooling
  7. Standalone dev auth
  8. Options
  9. Support
  10. License

@bardioc/create-bardioc-app

Scaffold a Vite app wired for @bardioc/app-sdk.

Requirements

  • Node.js >=20.19.0

Install

Install the CLI globally from the public npm registry:

npm install -g @bardioc/create-bardioc-app

If your default npm registry is not https://registry.npmjs.org/, set it in your user-level npm config before installing app dependencies.

You can also run it without a global install:

npm exec --yes @bardioc/create-bardioc-app my-app -- --port 3005

Quick start

create-bardioc-app my-app --port 3005
cd my-app
npm install

Copy .env.example to .env and fill in VITE_APP_NAME and API_BASE_URL. Then run npm run dev.

Generated app

The generated app includes:

  • React + Vite project structure (or your chosen --template)
  • @bardioc/app-sdk dependency
  • AppSdkProvider wiring
  • optional standalone dev auth via .env (API_BASE_URL): the host's login and a /rest proxy
  • a compact SDK demo with notification and transport examples
  • (vite) a station network graph built on GraphChart from @bardioc/org-chart — the reference for graph views
  • public/app-manifest.json

Release infra (out of the box)

Every scaffolded app ships a lightweight versioning toolkit:

  • Changesets (.changeset/ + changeset/release:* scripts) for semver-versioning the app
  • scripts/stamp-manifest.mjs — folds package.json's version into the built app-manifest.json and manifest.yaml (wired into npm run build / npm run bundle)
  • Compliance gate (scripts/compliance.mjs, audit.mjs, compliance-summary.mjs + sbom / compliance / audit:security / compliance:all scripts) — npm run bundle first writes a CycloneDX SBOM, checks production licenses against an allow list and fails on high/critical audit findings; the four reports land in public/ and ship inside the zip
  • Two Claude skills under .claude/commands/: /changeset-app (bump locally) and /refresh-bundle (rebuild the zip and swap it into a WebOS host checkout)

Opt-in tooling

Heavier, environment-specific tooling is off by default — pass a flag to include it:

  • --with-pipeline — a Bitbucket pipeline (bitbucket-pipelines.yml) running check-types/build/audit on PRs, with a publish step on dev. Publishing is dormant while the app stays "private": true + unscoped (pnpm changeset publish no-ops); the generated README.md documents how to enable it.
  • --with-link — the link:source / unlink:source dev flow (scripts/link-source.mjs + pnpm-workspace.yaml + .npmrc) for developing against an in-tree @bardioc/* source checkout.

Standalone dev auth

Generated apps can run standalone on the same login as the Bardioc host.

  1. Copy .env.example to .env
  2. Fill in VITE_APP_NAME and API_BASE_URL
  3. Run npm run dev; without a session it goes straight to the host login

When running outside the host iframe, startDevHost() sends the browser to the login when there is no session, then stands in for the host, and the SDK proxies /rest/* to API_BASE_URL on the session cookies. The BFF returns from the login only to the localhost ports it lists in AUTH_DEV_ORIGINS (on dev: 3000-3010), so keep --port in that range. Vite templates do this through the bardiocDevAuth plugin; the angular and nextjs templates run scripts/dev.mjs, which starts it alongside their dev server.

Options

  • --template <name> — framework template (default vite)
  • --port <port> — dev server port, default 3005
  • --with-pipeline — add the Bitbucket CI/publish pipeline (off by default)
  • --with-link — add the link:source dev flow for local @bardioc/* checkouts (off by default)

Support

For support, contact [email protected].

License

MIT.

Copyright (c) 2026 ALMATO AG. All rights reserved.

This is an internal library for ALMATO AG.

版本与发布记录

@bardioc/create-bardioc-app 共发布 17 个版本,首次发布于 2026/06/29;过去 12 个月发布了 17 个版本。

版本发布日期距今
0.7.6latest2026/11/044 天前
0.7.52026/11/044 天前
0.7.42026/11/035 天前
0.7.32026/11/025 天前
0.7.22026/10/2712 天前
0.7.12026/10/2712 天前

关于 @bardioc/create-bardioc-app 的常见问题

@bardioc/create-bardioc-app 是什么?

Scaffold a Bardioc app with framework templates (vite, react, vue, angular, svelte, solid, preact, nextjs)

如何安装 @bardioc/create-bardioc-app?

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

@bardioc/create-bardioc-app 支持 TypeScript 吗?

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

@bardioc/create-bardioc-app 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bardioc/create-bardioc-app 需要什么版本的 Node.js?

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

@bardioc/create-bardioc-app 可以商用吗?

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

@bardioc/create-bardioc-app 的下载量有多少?

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

@bardioc/create-bardioc-app 还在维护吗?

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