create-fluxstack 1.0.0 → 1.0.1

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.
@@ -57,6 +57,7 @@ program
57
57
  'core',
58
58
  'app',
59
59
  'package.json',
60
+ 'package-template.json', // ✅ Template for project package.json
60
61
  'bun.lock', // ✅ CRITICAL: Copy lockfile to maintain working versions
61
62
  'tsconfig.json',
62
63
  'vite.config.ts',
@@ -73,22 +74,37 @@ program
73
74
  }
74
75
  }
75
76
 
76
- // Customize package.json
77
+ // Create package.json from template
77
78
  const packageJsonPath = join(projectPath, 'package.json')
78
- if (existsSync(packageJsonPath)) {
79
- const packageContent = readFileSync(packageJsonPath, 'utf-8')
80
- const packageJson = JSON.parse(packageContent)
81
-
82
- packageJson.name = projectName
83
- packageJson.description = `${projectName} - FluxStack application`
84
-
85
- // Remove scripts that don't make sense for user projects
86
- delete packageJson.scripts['test:watch']
87
- delete packageJson.scripts['test:coverage']
88
- delete packageJson.scripts['docs:build']
89
- delete packageJson.scripts['docs:serve']
90
-
91
- writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))
79
+ const templatePath = join(import.meta.dir, 'package-template.json')
80
+
81
+ if (existsSync(templatePath)) {
82
+ const templateContent = readFileSync(templatePath, 'utf-8')
83
+ const packageTemplate = templateContent.replace(/PROJECT_NAME/g, projectName)
84
+ writeFileSync(packageJsonPath, packageTemplate)
85
+ } else {
86
+ // Fallback template if package-template.json doesn't exist
87
+ const fallbackPackageJson = {
88
+ "name": projectName,
89
+ "version": "1.0.0",
90
+ "description": `${projectName} - FluxStack application`,
91
+ "keywords": ["fluxstack", "bun", "typescript", "full-stack", "elysia", "react", "vite"],
92
+ "author": "Your Name",
93
+ "license": "MIT",
94
+ "type": "module",
95
+ "scripts": {
96
+ "dev": "bun core/cli/index.ts dev",
97
+ "dev:clean": "bun run-clean.ts",
98
+ "dev:backend": "bun core/cli/index.ts dev:backend",
99
+ "dev:frontend": "bun core/cli/index.ts dev:frontend",
100
+ "build": "bun core/cli/index.ts build",
101
+ "build:backend": "bun core/cli/index.ts build:backend",
102
+ "build:frontend": "bun core/cli/index.ts build:frontend",
103
+ "start": "NODE_ENV=production bun app/server/index.ts",
104
+ "typecheck": "bunx tsc --noEmit"
105
+ }
106
+ }
107
+ writeFileSync(packageJsonPath, JSON.stringify(fallbackPackageJson, null, 2))
92
108
  }
93
109
 
94
110
  // Customize .env for development mode
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "PROJECT_NAME",
3
+ "version": "1.0.0",
4
+ "description": "PROJECT_NAME - FluxStack application",
5
+ "keywords": ["fluxstack", "bun", "typescript", "full-stack", "elysia", "react", "vite"],
6
+ "author": "Your Name",
7
+ "license": "MIT",
8
+ "type": "module",
9
+ "scripts": {
10
+ "dev": "bun core/cli/index.ts dev",
11
+ "dev:clean": "bun run-clean.ts",
12
+ "dev:backend": "bun core/cli/index.ts dev:backend",
13
+ "dev:frontend": "bun core/cli/index.ts dev:frontend",
14
+ "build": "bun core/cli/index.ts build",
15
+ "build:backend": "bun core/cli/index.ts build:backend",
16
+ "build:frontend": "bun core/cli/index.ts build:frontend",
17
+ "start": "NODE_ENV=production bun app/server/index.ts",
18
+ "start:backend": "NODE_ENV=production bun app/server/backend-only.ts",
19
+ "start:frontend": "NODE_ENV=production bun app/client/frontend-only.ts",
20
+ "typecheck": "bunx tsc --noEmit",
21
+ "test": "vitest",
22
+ "test:ui": "vitest --ui",
23
+ "test:coverage": "vitest --coverage"
24
+ },
25
+ "dependencies": {
26
+ "@types/react": "^19.1.2",
27
+ "@types/react-dom": "^19.1.5",
28
+ "@vitejs/plugin-react": "^4.3.6",
29
+ "elysia": "^1.4.6",
30
+ "react": "^19.1.0",
31
+ "react-dom": "^19.1.0",
32
+ "tailwindcss": "^4.1.0",
33
+ "typescript": "^5.9.2",
34
+ "vite": "^7.0.4",
35
+ "vitest": "^2.2.0"
36
+ },
37
+ "devDependencies": {
38
+ "@eden-treaty/elysia": "^1.1.5",
39
+ "@swagger-ui/dist": "^5.19.2",
40
+ "@types/bun": "latest",
41
+ "@vitest/coverage-v8": "^2.2.0",
42
+ "@vitest/ui": "^2.2.0",
43
+ "happy-dom": "^16.7.0"
44
+ },
45
+ "engines": {
46
+ "bun": ">=1.2.0",
47
+ "node": ">=20.0.0"
48
+ },
49
+ "preferredPackageManager": "bun",
50
+ "trustedDependencies": ["esbuild"]
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fluxstack",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "⚡ Create FluxStack apps with zero configuration - powered by Bun",
5
5
  "keywords": ["fluxstack", "create-app", "bun", "typescript", "full-stack", "framework", "elysia", "react", "vite"],
6
6
  "author": "Marcos",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "files": [
18
18
  "create-fluxstack.ts",
19
+ "package-template.json",
19
20
  "core/**/*",
20
21
  "app/**/*",
21
22
  "README.md",