Skip to content
Open
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
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ pnpm execute # run the built CLI locally
pnpm generate # interactive flow via tsx (source)
```

Generate specific variants (output defaults to `generated/` unless `--out` is given):

```bash
pnpm generate:sdk -- react --name my-app --client pjs
pnpm generate:xcm-api -- vue --name my-api --package-manager npm
```

## Project layout

- `src/` — the TypeScript CLI (entry `src/index.ts`, bundled to `dist/`)
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ For the **Node.js** framework it additionally (optionally) prompts for a **Subst
<details><summary><b>For Agents & CI</b></summary>
<br>

Use `sdk` or `api` as the first argument (or `--type`), plus `--name`. SDK projects also accept `--client` (defaults to `pjs`; on a TTY you're prompted for it if omitted).
Use `sdk` or `api` as the subcommand, plus `--name`. SDK projects also accept `--client` (defaults to `pjs`; on a TTY you're prompted for it if omitted).

```bash
npx create-paraspell@latest sdk react --name my-app --client pjs --package-manager pnpm
npx create-paraspell@latest api vue --name my-api --package-manager npm
npx create-paraspell@latest --type sdk --framework node --name my-node --client dedot --evm
npx create-paraspell@latest sdk node --name my-node --client dedot --evm
```

```bash
Expand All @@ -110,10 +110,9 @@ On a TTY, omitting `--name` or `--client` (SDK) opens prompts. Without a TTY, se

| Flag | Values | Default |
|------|--------|---------|
| `--type` | `sdk`, `api` | required when not using `sdk`/`api` subcommand |
| `--framework` | `react`, `vue`, `node` | `react` |
| `<framework>` positional / `--framework` | `react`, `vue`, `node` | `react` |
| `--client` (SDK only) | `papi`, `pjs`, `dedot` | `pjs` |
| `--evm`, `--swap`, `--snowbridge` | bare flag enables feature | `false` |
| `--evm`, `--swap`, `--snowbridge` | bare flag enables; `--no-evm` etc. disables | `false` |
| `--package-manager` | `npm`, `yarn`, `pnpm`, `bun` | `pnpm` |
| `--name`, `--out` | | `./<name>` in the current directory |
| `--substrate-mnemonic` | (Node only) seed the generated `.env` | — |
Expand All @@ -137,23 +136,19 @@ Found a vulnerability? See [SECURITY.md](SECURITY.md).
<details><summary><b>Repository development</b></summary>
<br>

Clone this repo and use the same flags via dev scripts. Output defaults to `generated/` unless you pass `--out`:
Clone this repo and run the CLI from source — it takes the same `sdk` / `api` subcommands and flags as `create-paraspell` (pass `--out` to choose where the app is written):

```bash
pnpm install
pnpm build
pnpm execute # run the built CLI locally
pnpm generate # interactive flow via tsx (source)

pnpm generate:sdk -- react --name my-app --client pjs --package-manager pnpm
pnpm generate:xcm-api -- vue --name my-api --package-manager npm
```

**Package layout:**

```text
├── index.js # starting point
├── dist/ # built CLI
├── dist/ # built CLI (bin entry: dist/index.js)
├── assets/ # bundled static files
├── _templates/ # Hygen generators
│ ├── shared/ # shared EJS partials (evm, xcm)
Expand Down
3 changes: 0 additions & 3 deletions index.js

This file was deleted.

18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
"license": "MIT",
"author": "ParaSpell",
"bin": {
"create-paraspell": "index.js"
"create-paraspell": "dist/index.js"
},
"files": [
"index.js",
"dist",
"_templates",
"assets",
Expand Down Expand Up @@ -40,25 +39,18 @@
"dev": "tsdown --watch",
"build": "tsdown",
"typecheck": "tsc -p tsconfig.json",
"prepublishOnly": "npm run build",
"execute": "node index.js",
"execute": "node dist/index.js",
"generate": "tsx src/index.ts",
"generate:sdk": "tsx src/generate-sdk.ts",
"generate:xcm-api": "tsx src/generate-xcm-api.ts",
"generate:sdk:examples": "tsx src/generate-sdk-examples.ts",
"generate:xcm-api:examples": "tsx src/generate-xcm-api-examples.ts",
"test": "vitest run --project structure",
"test:typecheck": "vitest run --project typecheck",
"test:build": "vitest run --project build",
"test:all": "vitest run",
"test:watch": "vitest --project structure",
"test:generate": "tsx src/tests/generate-all.ts"
"test:generate": "tsx src/generate-examples.ts"
},
"dependencies": {
"@inquirer/ansi": "^2.0.7",
"@inquirer/core": "^11.2.1",
"@inquirer/figures": "^2.0.7",
"@inquirer/prompts": "^8.4.3",
"@clack/prompts": "^1.7.0",
"@stricli/core": "^1.3.0",
"ejs": "^6.0.1",
"hygen": "^6.2.11",
"terminal-image": "^4.3.0",
Expand Down
Loading
Loading