@alphasquad/create-saleor-storefront
v0.1.5
Published
CLI to scaffold Saleor storefront tenant wrappers from AlphaSquad core templates
Readme
@alphasquad/create-saleor-storefront
CLI to scaffold a Saleor tenant storefront by selecting one of three AlphaSquad core templates:
basic->@alphasquad/saleor-template-basicstandard->@alphasquad/saleor-template-standardadvance->@alphasquad/saleor-template-advance
Usage
npx @alphasquad/create-saleor-storefront@latest my-tenantInteractive flow:
- Select
basic,standard, oradvance. - Prompt for all configurable values discovered from template config (prefers
template/config.schema.json, falls back to.env.example). - Scaffold a tenant wrapper repo locally.
Flags
--template <basic|standard|advance>
--config <path-to-json>
--yes
--package-manager <npm|pnpm|yarn>
--no-install
--ci
--no-ciHeadless example
npx @alphasquad/create-saleor-storefront@latest my-tenant \
--template standard \
--config ./tenant-config.json \
--package-manager npm \
--yes \
--citenant-config.json supports:
{
"template": "standard",
"ci": true,
"env": {
"NEXT_PUBLIC_API_URL": "https://api.example.com/graphql/",
"NEXT_PUBLIC_SITE_URL": "https://shop.example.com"
}
}Update propagation model
Generated tenant repos depend on one base template npm package. Template updates propagate by updating that dependency.
If CI is enabled, template-sync.yml:
- runs every 6 hours and on
repository_dispatch - updates template package to
@latest - runs checks
- opens a PR and enables auto-merge
This is the mechanism that reflects base template updates in tenant repos.
Local development
npm install
npm run typecheckAutomated publishing
This repo publishes to npm via GitHub Actions:
.github/workflows/ci.ymlruns typecheck on PRs andmain..github/workflows/publish.ymlpublishes on tag push matchingv*.*.*.
Release flow:
# 1) bump package.json version
# 2) commit + push to main
git tag vX.Y.Z
git push origin vX.Y.ZThe publish workflow verifies that vX.Y.Z matches package.json version before publishing.
Required repo secret:
NPM_TOKENwith publish access for@alphasquad/*
