@guardian/source-development-kitchen

中文文档
30.0.0发布于 2026/10/08TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 2.3万

npm

原始使用文档
文档目录7 节
  1. Install
  2. Example
  3. Documentation
  4. Ownership
  5. Evolution
  6. Motivation
  7. Publishing

@guardian/source-development-kitchen

npm

The Source Development Kitchen is where new components and patterns can be cooked up, tested and shared. There are minimal acceptance criteria. It’s okay to duplicate and break things. If a Kitchen component proves valuable, it may be promoted to @guardian/source.

This package is part of the Source design system.

Install

$ pnpm add @guardian/source-development-kitchen

or

$ yarn add @guardian/source-development-kitchen

or

$ npm install @guardian/source-development-kitchen

Example

import { Lines } from '@guardian/source-development-kitchen/react-components';

const Section = () => (
    <>
        <Lines count={8} />
        <Lines effect="squiggly" />
    </>
);

Documentation

Full documentation is available in the Source Development Kitchen storybook.

Ownership

Kitchen components are unsupported by CSTI. They are owned by the team or teams consuming them.

Owners are defined in CODEOWNERS.

If you wish to start consuming a Kitchen component, add your team as CODEOWNERS. This ensures you are notified of changes to the component.

Evolution

Changes to Kitchen components are to be expected. Components in the Kitchen should be considered experimental and likely to change in ways that break things.

Components that prove valuable may be promoted to @guardian/source. In order to achieve this, the component must meet Source’s acceptance criteria. The best way to meet these is for developers to work in close collaboration with design and UX when building and evolving a component. Components should express some pattern, rule or aspect of design that is governed by Source.

Motivation

Source is a library where teams can expect to find high quality shared components. Adding new components to Source requires deep work and collaboration across disciplines – design, UX and engineering. It takes a long time and substantial effort for components to land in Source.

Potential contributors are put off contributing directly to Source, as they find it hard to balance the time investment against their team's priorities. The cost of this is two-fold:

  • The number of high quality components available in Source is lower than it could be.
  • Potentially shareable components are built directly into applications, leading to fragmentation, inconsistency and duplication.

We believe there is value in moving quickly, experimenting with new ideas and sharing those ideas for wider input. The Source Development Kitchen helps teams achieve this by lowering the barrier to entry. It allows teams to get fast feedback on new components, both from users and from other developers.

By providing an agile mechanism for iterating and improving, components can be brought up to the level of quality expected of Source, and everyone can benefit from the work put into them.

Publishing

The Source Development Kitchen is published as its own package, independent of the stable components in @guardian/source. This:

  • Allows the Kitchen to move fast.
  • Allows us to make frequent breaking changes to the Source Development Kitchen whilst preserving semver in Source. The stable library changes at a slower pace, in order to set expectations and preserve developer confidence.

版本与发布记录

@guardian/source-development-kitchen 共发布 234 个版本,首次发布于 2024/05/17;过去 12 个月发布了 53 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
30.0.0latest2026/10/081 个月前
29.1.02026/08/113 个月前
0.0.0-canary-20260811140550canary2026/08/113 个月前
0.0.0-canary-202608111403032026/08/113 个月前
0.0.0-canary-202608111355412026/08/113 个月前
0.0.0-canary-202608101040352026/08/103 个月前

关于 @guardian/source-development-kitchen 的常见问题

如何安装 @guardian/source-development-kitchen?

在项目目录运行 npm install @guardian/source-development-kitchen,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:tslib(^2.8.1)、@guardian/libs(^33.0.0)、@guardian/source(^14.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@guardian/source-development-kitchen 支持 TypeScript 吗?

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

@guardian/source-development-kitchen 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@guardian/source-development-kitchen 可以商用吗?

@guardian/source-development-kitchen 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@guardian/source-development-kitchen 的下载量有多少?

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

@guardian/source-development-kitchen 还在维护吗?

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