create-qorechain-dapp 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/dist/index.js +1083 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
- package/templates/README.md +32 -0
- package/templates/evm-solidity/.env.example +9 -0
- package/templates/evm-solidity/README.md +81 -0
- package/templates/evm-solidity/contracts/Counter.artifact.ts +49 -0
- package/templates/evm-solidity/contracts/Counter.sol +33 -0
- package/templates/evm-solidity/package.json +20 -0
- package/templates/evm-solidity/scripts/deploy.ts +98 -0
- package/templates/evm-solidity/tsconfig.json +17 -0
- package/templates/fullstack-web/.env.example +5 -0
- package/templates/fullstack-web/README.md +53 -0
- package/templates/fullstack-web/index.html +12 -0
- package/templates/fullstack-web/package.json +25 -0
- package/templates/fullstack-web/src/App.tsx +134 -0
- package/templates/fullstack-web/src/main.tsx +15 -0
- package/templates/fullstack-web/src/vite-env.d.ts +10 -0
- package/templates/fullstack-web/tsconfig.json +18 -0
- package/templates/fullstack-web/vite.config.ts +10 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# create-qorechain-dapp
|
|
2
|
+
|
|
3
|
+
Scaffold a new QoreChain dApp from an official starter template.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
# interactive
|
|
7
|
+
npm create qorechain-dapp my-dapp
|
|
8
|
+
# or
|
|
9
|
+
npx create-qorechain-dapp my-dapp
|
|
10
|
+
|
|
11
|
+
# non-interactive (CI)
|
|
12
|
+
npx create-qorechain-dapp my-dapp --template evm-solidity --yes --no-install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Templates
|
|
16
|
+
|
|
17
|
+
| Template | Description |
|
|
18
|
+
| --------------- | ------------------------------------------------------------------------------------ |
|
|
19
|
+
| `evm-solidity` | A Solidity `Counter` contract + a viem deploy/interact script (`@qorechain/evm`). |
|
|
20
|
+
| `fullstack-web` | A Vite + React + TypeScript dApp reading balances and tokenomics (`@qorechain/sdk`). |
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
| Flag | Description |
|
|
25
|
+
| -------------------------- | --------------------------------------------------------------------------- |
|
|
26
|
+
| `-t, --template <name>` | Template to use (`evm-solidity` \| `fullstack-web`). |
|
|
27
|
+
| `--network <name>` | Network preset (`testnet` \| `mainnet`). |
|
|
28
|
+
| `--package-manager <pm>` | `pnpm` \| `npm` \| `yarn`. |
|
|
29
|
+
| `-y, --yes` | Skip prompts and use defaults. |
|
|
30
|
+
| `--no-install` | Do not install dependencies after scaffolding. |
|
|
31
|
+
| `--local` | Rewrite `@qorechain/*` deps to local `file:` links into the SDK monorepo. |
|
|
32
|
+
| `-h, --help` | Show help. |
|
|
33
|
+
| `-v, --version` | Print the version. |
|
|
34
|
+
|
|
35
|
+
## Local development against the workspace
|
|
36
|
+
|
|
37
|
+
`@qorechain/*` packages are published to npm; once published a plain
|
|
38
|
+
`npm install` works. Before then, use `--local` to point the scaffolded project
|
|
39
|
+
at the monorepo packages (build them first with `pnpm -r build`):
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx create-qorechain-dapp my-dapp --template fullstack-web --local
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## How templates are bundled
|
|
46
|
+
|
|
47
|
+
The templates live at the monorepo root in `templates/`. On `build` they are
|
|
48
|
+
copied into `cli/templates/` so the published npm package is self-contained; the
|
|
49
|
+
`scaffold()` function resolves them from either location.
|