create-turbo-mono 1.0.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/.claude/settings.local.json +14 -0
- package/README.md +182 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +42 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/templates/backend.d.ts +2 -0
- package/dist/templates/backend.d.ts.map +1 -0
- package/dist/templates/backend.js +424 -0
- package/dist/templates/backend.js.map +1 -0
- package/dist/templates/cicd.d.ts +3 -0
- package/dist/templates/cicd.d.ts.map +1 -0
- package/dist/templates/cicd.js +307 -0
- package/dist/templates/cicd.js.map +1 -0
- package/dist/templates/docker.d.ts +3 -0
- package/dist/templates/docker.d.ts.map +1 -0
- package/dist/templates/docker.js +458 -0
- package/dist/templates/docker.js.map +1 -0
- package/dist/templates/docs.d.ts +3 -0
- package/dist/templates/docs.d.ts.map +1 -0
- package/dist/templates/docs.js +71 -0
- package/dist/templates/docs.js.map +1 -0
- package/dist/templates/frontend.d.ts +2 -0
- package/dist/templates/frontend.d.ts.map +1 -0
- package/dist/templates/frontend.js +441 -0
- package/dist/templates/frontend.js.map +1 -0
- package/dist/templates/root.d.ts +3 -0
- package/dist/templates/root.d.ts.map +1 -0
- package/dist/templates/root.js +210 -0
- package/dist/templates/root.js.map +1 -0
- package/dist/templates/shared.d.ts +2 -0
- package/dist/templates/shared.d.ts.map +1 -0
- package/dist/templates/shared.js +696 -0
- package/dist/templates/shared.js.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +34 -0
- package/dist/utils.js.map +1 -0
- package/package.json +40 -0
- package/src/index.ts +138 -0
- package/src/scaffold.ts +51 -0
- package/src/templates/backend.ts +460 -0
- package/src/templates/cicd.ts +334 -0
- package/src/templates/docker.ts +503 -0
- package/src/templates/docs.ts +74 -0
- package/src/templates/frontend.ts +469 -0
- package/src/templates/root.ts +216 -0
- package/src/templates/shared.ts +820 -0
- package/src/utils.ts +31 -0
- package/tsconfig.json +20 -0
package/src/utils.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { exec } from 'child_process';
|
|
2
|
+
import { promisify } from 'util';
|
|
3
|
+
|
|
4
|
+
const execAsync = promisify(exec);
|
|
5
|
+
|
|
6
|
+
export async function checkPnpmInstalled(): Promise<boolean> {
|
|
7
|
+
try {
|
|
8
|
+
await execAsync('pnpm --version');
|
|
9
|
+
return true;
|
|
10
|
+
} catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function installDependencies(targetDir: string): Promise<void> {
|
|
16
|
+
await execAsync('pnpm install', { cwd: targetDir });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function toPascalCase(str: string): string {
|
|
20
|
+
return str
|
|
21
|
+
.split(/[-_\s]/)
|
|
22
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
23
|
+
.join('');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function toKebabCase(str: string): string {
|
|
27
|
+
return str
|
|
28
|
+
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
|
29
|
+
.replace(/[\s_]+/g, '-')
|
|
30
|
+
.toLowerCase();
|
|
31
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"moduleResolution": "node"
|
|
17
|
+
},
|
|
18
|
+
"include": ["src/**/*"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|