Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/first-create-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@dashcommerce/create": minor
---

Initial release — scaffold a new DashCommerce project with `npm create @dashcommerce@latest`.

- Interactive prompts for project directory, template, dependency install, and git init
- `--template <name>` flag for non-interactive overrides (default: `starter`)
- Template downloads via `giget` from the `emdashCommerce/starter` flat repo
- Detects the invoking package manager (bun/pnpm/yarn/npm) and runs install with it
- Prints Stripe setup + `bun run dev` next steps on success
36 changes: 35 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions packages/create/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# @dashcommerce/create

Scaffold a new [DashCommerce](https://dashcommerce.dev) project.

```sh
npm create @dashcommerce@latest
# or
npm create @dashcommerce@latest my-shop
# or
npm create @dashcommerce@latest my-shop -- --template starter
```

Works with `bun create`, `pnpm create`, and `yarn create` too — whichever package manager you invoke with is the one used to install the scaffolded project's dependencies.

## Templates

| Name | What you get |
|---|---|
| `starter` | Full Astro commerce site — 6 demo products, Stripe checkout, blog, subscriptions, admin. Mirrored from [`emdashCommerce/starter`](https://github.com/emdashCommerce/starter). |

More templates will be added as standalone flat repos ship; the CLI picks them up automatically.

## What it does

1. Prompts for a project directory + template
2. Downloads the template via [`giget`](https://github.com/unjs/giget) (fast, no git clone)
3. Runs `install` with your package manager
4. `git init` + initial commit
5. Prints the Stripe + dev-server next steps

## License

MIT — see the monorepo [LICENSE](https://github.com/emdashCommerce/dashcommerce/blob/main/LICENSE).
63 changes: 63 additions & 0 deletions packages/create/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "@dashcommerce/create",
"version": "0.1.0",
"description": "Scaffold a new DashCommerce project. Invoke with `npm create @dashcommerce@latest`.",
"type": "module",
"main": "./dist/index.mjs",
"bin": {
"create-dashcommerce": "./dist/index.mjs"
},
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"files": [
"dist",
"README.md"
],
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch",
"typecheck": "tsc --noEmit",
"prepublishOnly": "bun run build"
},
"dependencies": {
"giget": "^3.2.0",
"picocolors": "^1.1.1",
"prompts": "^2.4.2"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/prompts": "^2.4.9",
"tsdown": "^0.20.0",
"typescript": "^5.9.0"
},
"engines": {
"node": ">=18"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"dashcommerce",
"emdash",
"starter",
"cli",
"scaffold",
"ecommerce",
"commerce"
],
"author": "DashCommerce contributors",
"license": "MIT",
"homepage": "https://dashcommerce.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/emdashCommerce/dashcommerce.git",
"directory": "packages/create"
},
"bugs": {
"url": "https://github.com/emdashCommerce/dashcommerce/issues"
}
}
Loading
Loading