@compiler-explorer/golden-layout

中文文档
1.6.3发布于 2026/10/18MITTypeScriptCommonJS构建来源已验证近 30 天下载 2428

A multi-screen javascript Layout manager https://golden-layout.com

原始使用文档
文档目录4 节
  1. How Compiler Explorer uses it
  2. Development
  3. Releasing a new version (CE admins)
  4. License

Golden Layout 1.x: Compiler Explorer fork

This is Compiler Explorer's fork of Golden Layout 1.x. We maintain it only for Compiler Explorer: it's based on upstream 1.5.9 with a few fixes and modernised tooling. It's published to npm as @compiler-explorer/golden-layout.

If you want Golden Layout for your own project, use upstream (golden-layout on npm), not this fork. We don't support other uses, and we only make changes Compiler Explorer needs.

How Compiler Explorer uses it

Compiler Explorer installs it through an npm alias, so code and CSS still refer to golden-layout:

"golden-layout": "npm:@compiler-explorer/[email protected]"

Development

npm ci
npm run build  # build dist/ and src/css from the sources (not committed)
npm test       # Vitest tests in headless Chrome, plus a type-check of index.d.ts

The tests use Vitest browser mode with Playwright driving the system Chrome, so Chrome must be installed. They load jQuery and the concatenated build, made in memory from the sources exactly as npm run build makes dist/goldenlayout.js. Run one file with npx vitest run test/title-tests.js, or filter by name with -t.

dist/ and the compiled src/css themes are build output: they aren't committed, and npm pack/npm publish build them first. See CLAUDE.md for how the build fits together.

Releasing a new version (CE admins)

Releases are made by Release Please from the PR titles merged to ce-main.

  1. Agree the change with the other CE admins first. Every release goes straight to npm, and from there into Compiler Explorer.
  2. Give the PR a conventional commit title, which CI checks: fix: ... for a patch release, feat: ... for a minor one, or chore:, docs:, ci:, build:, test: or refactor: for no release. Squash-merge it, so the title becomes the commit message.
  3. Release Please then opens (or updates) a release PR that bumps the version in package.json and package-lock.json and adds the changes to CHANGELOG.md. Merge it when you want to release.
  4. Merging the release PR tags v<x.y.z>, creates the GitHub release, and the release workflow publishes to npm through Trusted Publishing, with provenance; no npm token is involved. It refuses to publish if the package is missing its built files.
  5. Update Compiler Explorer's package.json and package-lock.json to the new version in a CE PR.

License

MIT, copyright deepstream.io; see LICENSE.

版本与发布记录

@compiler-explorer/golden-layout 共发布 5 个版本,首次发布于 2026/10/18;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.6.3latest2026/10/1823 天前
1.6.22026/10/1823 天前
1.6.12026/10/1823 天前
1.6.02026/10/1823 天前
0.0.0-stage2026/10/1823 天前

关于 @compiler-explorer/golden-layout 的常见问题

@compiler-explorer/golden-layout 是什么?

A multi-screen javascript Layout manager https://golden-layout.com

如何安装 @compiler-explorer/golden-layout?

在项目目录运行 npm install @compiler-explorer/golden-layout,或使用 pnpm add / yarn add / bun add。

@compiler-explorer/golden-layout 支持 TypeScript 吗?

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

@compiler-explorer/golden-layout 支持 ESM 还是 CommonJS?

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

@compiler-explorer/golden-layout 可以商用吗?

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

@compiler-explorer/golden-layout 的下载量有多少?

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

@compiler-explorer/golden-layout 还在维护吗?

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