@sixtyninecommerce/create-storefront
v0.3.8
Published
Scaffold a sixtynine-commerce storefront from the official template
Readme
@sixtyninecommerce/create-storefront
Scaffolder for the sixtynine-commerce storefront template.
Usage
npm create @sixtyninecommerce/storefront <project-dir> --store-code <code>Example:
npm create @sixtyninecommerce/storefront my-shop --store-code my-channelThe CLI:
- Validates the channel exists by calling
client.commerce.getBranding(). - Downloads the latest tagged release of the template from GitHub.
- Applies your channel's
BrandingInfoto the scaffold:- Writes
src/theme.config.tswith the primary color and font identifiers. - Drops
logo-light,logo-dark,favicon, andcoverassets intopublic/. - Writes
.env.localsonpm run devconnects to the right channel. - Substitutes
package.jsonnameanddescription.
- Writes
- Picks the locale shape that matches the channel's
urlLocaleStrategy.
Flags
| Flag | Default | Notes |
|---|---|---|
| --store-code <code> | (required) | Channel code from the dashboard |
| --cdn-url <url> | https://cdn.sixtyninecommerce.com | Channel CDN base URL |
| --cms-url <url> | SDK production default | Override for self-hosted/local CMS |
| --vendure-url <url> | SDK production default | Override for self-hosted/local Vendure |
| --plugins-url <url> | SDK production default | Override for self-hosted/local plugins service |
| --site-url <url> | branding.storefront.url or http://localhost:6969 | Storefront URL for SEO meta |
| --template-ref <ref> | latest release tag | Tag, branch, or commit SHA |
Environment
GITHUB_TOKEN— set when fetching from a private repo or to avoid GitHub rate limits.
After scaffolding
cd <project-dir>
npm install
npm run dev