@cloudwerk/create-app 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,68 @@
1
+ # @cloudwerk/create-app
2
+
3
+ Scaffold a new Cloudwerk project with a single command.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx @cloudwerk/create-app my-app
9
+ ```
10
+
11
+ Or with a specific package manager:
12
+
13
+ ```bash
14
+ pnpm create @cloudwerk/app my-app
15
+ npm create @cloudwerk/app my-app
16
+ yarn create @cloudwerk/app my-app
17
+ ```
18
+
19
+ ## Options
20
+
21
+ ```
22
+ Usage: create-cloudwerk-app [options] <project-name>
23
+
24
+ Options:
25
+ -r, --renderer <type> UI renderer (hono-jsx, react, none)
26
+ -V, --version Output version number
27
+ -h, --help Display help
28
+ ```
29
+
30
+ ## Templates
31
+
32
+ | Renderer | Description |
33
+ |----------|-------------|
34
+ | `hono-jsx` | Full-stack app with Hono JSX (default) |
35
+ | `react` | Full-stack app with React SSR |
36
+ | `none` | API-only backend, no UI rendering |
37
+
38
+ ## Examples
39
+
40
+ ```bash
41
+ # Interactive mode (prompts for renderer)
42
+ npx @cloudwerk/create-app my-app
43
+
44
+ # Hono JSX template (default)
45
+ npx @cloudwerk/create-app my-app --renderer hono-jsx
46
+
47
+ # React template
48
+ npx @cloudwerk/create-app my-app --renderer react
49
+
50
+ # API-only template
51
+ npx @cloudwerk/create-app my-app --renderer none
52
+ ```
53
+
54
+ ## What's Included
55
+
56
+ Each template includes:
57
+ - Pre-configured `cloudwerk.config.ts`
58
+ - Example routes in `app/routes/`
59
+ - TypeScript configuration
60
+ - Development scripts (`dev`, `build`)
61
+
62
+ ## Documentation
63
+
64
+ For full documentation, visit: https://github.com/squirrelsoft-dev/cloudwerk
65
+
66
+ ## Part of Cloudwerk
67
+
68
+ This package is part of the [Cloudwerk](https://github.com/squirrelsoft-dev/cloudwerk) monorepo.
package/dist/index.js CHANGED
@@ -178,8 +178,9 @@ function printSuccessBanner(projectName, projectPath, pm) {
178
178
  }
179
179
 
180
180
  // src/versions.ts
181
- var CORE_VERSION = "0.3.0";
182
- var CLI_VERSION = "0.4.0";
181
+ var CORE_VERSION = "0.7.2";
182
+ var CLI_VERSION = "0.7.2";
183
+ var UI_VERSION = "0.7.2";
183
184
 
184
185
  // src/scaffold.ts
185
186
  function getTemplateDir(renderer) {
@@ -188,7 +189,7 @@ function getTemplateDir(renderer) {
188
189
  return path2.resolve(__dirname, "..", templateName);
189
190
  }
190
191
  function processTemplate(content, values) {
191
- return content.replace(/\{\{name\}\}/g, values.name).replace(/\{\{coreVersion\}\}/g, values.coreVersion).replace(/\{\{cliVersion\}\}/g, values.cliVersion);
192
+ return content.replace(/\{\{name\}\}/g, values.name).replace(/\{\{coreVersion\}\}/g, values.coreVersion).replace(/\{\{cliVersion\}\}/g, values.cliVersion).replace(/\{\{uiVersion\}\}/g, values.uiVersion);
192
193
  }
193
194
  function isTemplateFile(fileName) {
194
195
  return fileName.endsWith(".tmpl");
@@ -216,7 +217,8 @@ async function scaffold(projectName, options = {}) {
216
217
  const templateValues = {
217
218
  name: projectName,
218
219
  coreVersion: CORE_VERSION,
219
- cliVersion: CLI_VERSION
220
+ cliVersion: CLI_VERSION,
221
+ uiVersion: UI_VERSION
220
222
  };
221
223
  logger.info(`Creating ${projectName}...`);
222
224
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudwerk/create-app",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Create a new Cloudwerk app",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,3 @@
1
1
  import { defineConfig } from '@cloudwerk/core'
2
2
 
3
- export default defineConfig({
4
- routesDir: 'app/routes',
5
- })
3
+ export default defineConfig({})
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "@cloudwerk/core": "^{{coreVersion}}",
13
13
  "@cloudwerk/cli": "^{{cliVersion}}",
14
+ "@cloudwerk/ui": "^{{uiVersion}}",
14
15
  "hono": "^4.0.0"
15
16
  },
16
17
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import Counter from '../components/counter'
1
+ import Counter from './components/counter'
2
2
 
3
3
  export default function HomePage() {
4
4
  return (
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from '@cloudwerk/core'
2
2
 
3
3
  export default defineConfig({
4
- routesDir: 'app/routes',
5
4
  ui: {
6
5
  renderer: 'hono-jsx',
7
6
  },
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "@cloudwerk/core": "^{{coreVersion}}",
13
13
  "@cloudwerk/cli": "^{{cliVersion}}",
14
+ "@cloudwerk/ui": "^{{uiVersion}}",
14
15
  "hono": "^4.0.0"
15
16
  },
16
17
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import Counter from '../components/counter'
1
+ import Counter from './components/counter'
2
2
 
3
3
  export default function HomePage() {
4
4
  return (
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from '@cloudwerk/core'
2
2
 
3
3
  export default defineConfig({
4
- routesDir: 'app/routes',
5
4
  ui: {
6
5
  renderer: 'react',
7
6
  },
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "@cloudwerk/core": "^{{coreVersion}}",
13
13
  "@cloudwerk/cli": "^{{cliVersion}}",
14
+ "@cloudwerk/ui": "^{{uiVersion}}",
14
15
  "hono": "^4.0.0",
15
16
  "react": "^19.0.0",
16
17
  "react-dom": "^19.0.0"
File without changes