@goldencomm/create-baseline
v0.0.1
Published
Scaffold a standalone GoldenComm Baseline project — Next.js app, Shopify OS 2.0 theme, or WordPress site — wired to the @goldencomm/ds-* design-system packages. Run as `npm create @goldencomm/baseline`.
Maintainers
Readme
@goldencomm/create-baseline
Scaffolds a standalone project from a Baseline template — copies the template, then rewires it into its own project (names, README, the design-system deps, and platform-specific fixups). Zero dependencies; Node built-ins only.
Usage
Standalone (npm)
Because the package is named @goldencomm/create-baseline, npm's create prefix
mapping means the exact command is:
npm create @goldencomm/baseline <platform> <name>
# flags need a `--` separator so npm doesn't eat them:
npm create @goldencomm/baseline <platform> <name> -- --dir ../my-app --ds-version ^0.0.1(pnpm create @goldencomm/baseline … and npx @goldencomm/create-baseline … work too.)
Inside the monorepo
pnpm create-baseline <platform> <name> [options]
# or directly:
node tools/create-baseline/index.mjs <platform> <name> [options]| Platform | Produces |
|---|---|
| next | Next.js App Router app (React + ds-core/ds-react) |
| shopify | Shopify OS 2.0 theme (vendored baseline.css) |
| wordpress | WordPress site scaffold (Composer + DDEV) |
| dotnet | (no scaffold) — prints how to consume ds-html + baseline.css (Q-005) |
Options
| Flag | Default | Meaning |
|---|---|---|
| --dir <path> | ./<name> | Target directory |
| --ds-version <ver> | ^0.0.1 | Version pinned for the @goldencomm/ds-* deps |
| --force | — | Allow scaffolding into a non-empty directory |
pnpm create-baseline shopify acme-store
pnpm create-baseline next acme-proto --dir ../acme-proto --ds-version ^0.1.0
pnpm create-baseline wordpress acme-siteWhat it does
- Copies the template. Two auto-detected source modes:
- monorepo — inside the design-system repo it copies the committed files of
baselines/<platform>viagit ls-files(sonode_modules,dist,.next,.turbo,vendorare excluded automatically); - bundled — installed from npm it copies the
templates/snapshot that theprepackscript (scripts/bundle-templates.mjs) baked into the package at publish time from the samegit ls-fileslisting. (npm strips.gitignore/.npmrc/.npmignorefrom tarballs, so those are stored renamed —_gitignoreetc. — and restored on scaffold.)
- monorepo — inside the design-system repo it copies the committed files of
- Rewires identifiers:
package.json/composer.jsonname + description, the README title, and the Shopifytheme_name. - Rewrites DS deps — any
workspace:*(@goldencomm/ds-core,ds-react) becomes--ds-versionso the project resolves them from npm. - Platform fixups:
- shopify — repoints the
devtoken-watch atnode_modules/@goldencomm/ds-core. - wordpress — removes the monorepo bind-mount (
.ddev/docker-compose.packages.yaml), adds Composerrequire+ VCS repos forgoldencomm/wp-themeandgoldencomm/wp-blocks-plugin, renames the DDEV project, and updatesseed.sh(theme slug →wp-theme, site host →<name>.ddev.site).
- shopify — repoints the
Standalone readiness
- Shopify — works now;
baseline.cssis vendored intoassets/. - Next — needs
@goldencomm/ds-core+ds-reacton npm beforenpm installresolves (they ship at0.0.1). - WordPress —
goldencomm/wp-theme+wp-blocks-pluginare not published as Composer packages yet;composer installcurrently requires monorepo/Bitbucket VCS access and your own gitignoredauth.jsonfor the ACF/Gravity/Bitbucket credentials (never copied by the scaffolder). The scaffolder prints this caveat.
Publishing notes
templates/is generated byprepackand gitignored — never commit it; it is rebuilt from the committed baselines on everypnpm pack/npm publish.- Packing/publishing must therefore happen from a monorepo checkout (prepack runs
git ls-files).
