@skafform/create 0.2.1 → 0.2.3
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 +6 -5
- package/dist/next.js +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Scaffold a new [Skafform](https://github.com/skafform) project with Next.js or N
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npx @skafform/create <project-name> [next|nuxt]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Options
|
|
@@ -21,13 +21,13 @@ npm create @skafform@latest <project-name> [next|nuxt]
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
# Next.js (default)
|
|
24
|
-
|
|
24
|
+
npx @skafform/create my-app
|
|
25
25
|
|
|
26
26
|
# Next.js (explicit)
|
|
27
|
-
|
|
27
|
+
npx @skafform/create my-app next
|
|
28
28
|
|
|
29
29
|
# Nuxt (coming soon)
|
|
30
|
-
|
|
30
|
+
npx @skafform/create my-app nuxt
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## What's included
|
|
@@ -51,7 +51,8 @@ my-app/
|
|
|
51
51
|
│ ├── proxy.ts # Middleware logic (managed)
|
|
52
52
|
│ └── providers.tsx # React providers (managed)
|
|
53
53
|
├── proxy.ts # User-owned middleware entry point
|
|
54
|
-
|
|
54
|
+
├── app/
|
|
55
|
+
│ ├── layout.ts
|
|
55
56
|
```
|
|
56
57
|
|
|
57
58
|
## After scaffolding
|
package/dist/next.js
CHANGED
|
@@ -140,6 +140,22 @@ function scaffoldNext(name, targetDir) {
|
|
|
140
140
|
"};\n" +
|
|
141
141
|
"\n" +
|
|
142
142
|
"export default nextConfig;\n");
|
|
143
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(targetDir, "config.ts"), "const config = {\n" +
|
|
144
|
+
" appName: \"My App\",\n" +
|
|
145
|
+
" appDescription: \"Built with Skafform\",\n" +
|
|
146
|
+
" plans: [] as {\n" +
|
|
147
|
+
" name: string\n" +
|
|
148
|
+
" price: number\n" +
|
|
149
|
+
" priceAnchor?: number\n" +
|
|
150
|
+
" planId: string\n" +
|
|
151
|
+
" mode?: \"payment\" | \"subscription\"\n" +
|
|
152
|
+
" description?: string\n" +
|
|
153
|
+
" features: { name: string }[]\n" +
|
|
154
|
+
" isFeatured: boolean\n" +
|
|
155
|
+
" }[],\n" +
|
|
156
|
+
"}\n" +
|
|
157
|
+
"\n" +
|
|
158
|
+
"export default config\n");
|
|
143
159
|
console.log(`
|
|
144
160
|
┌─────────────────────────────────────────┐
|
|
145
161
|
│ Skafform Next.js project ready. │
|