@7365admin1/layer-common

中文文档
4.172.0发布于 2026/11/06MITES Module近 30 天下载 3.4万

Create Nuxt extendable layer with this GitHub template.

原始使用文档
文档目录6 节
  1. Setup
  2. Working on your layer
  3. Distributing your layer
  4. Development Server
  5. Production
  6. HERO robot rules for the mobile apps

Nuxt Layer Starter

Create Nuxt extendable layer with this GitHub template.

Setup

Make sure to install the dependencies:

pnpm install

Working on your layer

Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.

The .playground directory should help you on trying your layer during development.

Running pnpm dev will prepare and boot .playground directory, which imports your layer itself.

Distributing your layer

Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.

To do so, you only have to check if files in package.json are valid, then run:

npm publish --access public

Once done, your users will only have to run:

npm install --save your-layer

Then add the dependency to their extends in nuxt.config:

defineNuxtConfig({
  extends: 'your-layer'
})

Development Server

Start the development server on http://localhost:3000

pnpm dev

Production

Build the application for production:

pnpm build

Or statically generate it with:

pnpm generate

Locally preview production build:

pnpm preview

Checkout the deployment documentation for more information.

HERO robot rules for the mobile apps

utils/robot-display.ts is the canonical home of the HERO robot display rules. The React Native apps (iClean365, iMA365, iSecure365) cannot consume this layer and no separate npm package is published for them, so scripts/sync-robot-rules.mjs writes a dependency-free copy into each app (src/shared/robot-rules/robot-rules.ts, GENERATED, with a sha256 header) plus robot-rules.vectors.json - this repo's own answers for every case. Each app's test re-hashes the copy and runs the vectors, so a hand edit fails there.

After changing utils/robot-display.ts (or the lift-queue section of utils/robot-building.ts, or HERO_PALETTE in utils/theme.ts):

node scripts/sync-robot-rules.mjs ../iservice365-hygiene-mobile-app ../iservice365-ma-mobile-app ../isecure365-mobile-app
node scripts/sync-robot-rules.mjs --check ../iservice365-hygiene-mobile-app ../iservice365-ma-mobile-app ../isecure365-mobile-app

and open a PR in each app with the two regenerated files. test/robot-rules-sync.test.mjs checks the generator here. The script is not part of the published package.

版本与发布记录

@7365admin1/layer-common 共发布 1,078 个版本,首次发布于 2026/01/19;过去 12 个月发布了 1078 个版本。

版本发布日期距今
4.172.0latest2026/11/061 天前
4.97.1-staging.664staging2026/11/061 天前
4.97.1-staging.6632026/11/061 天前
4.171.02026/11/061 天前
4.97.1-staging.6622026/11/061 天前
4.170.22026/11/052 天前

关于 @7365admin1/layer-common 的常见问题

@7365admin1/layer-common 是什么?

Create Nuxt extendable layer with this GitHub template.

如何安装 @7365admin1/layer-common?

在项目目录运行 npm install @7365admin1/layer-common,或使用 pnpm add / yarn add / bun add。

@7365admin1/layer-common 支持 TypeScript 吗?

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

@7365admin1/layer-common 支持 ESM 还是 CommonJS?

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

@7365admin1/layer-common 可以商用吗?

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

@7365admin1/layer-common 的下载量有多少?

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

@7365admin1/layer-common 还在维护吗?

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