@thebros/create-benjamin 1.0.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,11 @@
1
+ # create-benjamin
2
+
3
+ Full-stack scaffolding CLI.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npm install
9
+ npm link
10
+ create-benjamin
11
+ ```
package/bin/index.js ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "fs-extra";
4
+ import path from "path";
5
+ import chalk from "chalk";
6
+ import inquirer from "inquirer";
7
+ import ora from "ora";
8
+ import { execa } from "execa";
9
+
10
+ async function main() {
11
+ console.log(chalk.cyan("\\n🚀 Create Benjamin Fullstack App\\n"));
12
+
13
+ const answers = await inquirer.prompt([
14
+ {
15
+ type: "input",
16
+ name: "projectName",
17
+ message: "Project name:",
18
+ default: "my-app"
19
+ }
20
+ ]);
21
+
22
+ const root = path.join(process.cwd(), answers.projectName);
23
+
24
+ if (fs.existsSync(root)) {
25
+ console.log(chalk.red("Project already exists"));
26
+ process.exit(1);
27
+ }
28
+
29
+ await fs.mkdir(root);
30
+
31
+ const spinner = ora("Creating frontend...").start();
32
+
33
+ await execa(
34
+ "npm",
35
+ ["create", "vite@latest", "frontend", "--", "--template", "react"],
36
+ {
37
+ cwd: root,
38
+ stdio: "inherit"
39
+ }
40
+ );
41
+
42
+ spinner.succeed("Frontend created");
43
+
44
+ console.log(chalk.green("\\n✅ Project created successfully"));
45
+ }
46
+
47
+ main();
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@thebros/create-benjamin",
3
+ "version": "1.0.2",
4
+ "description": "Full-stack scaffolding CLI",
5
+ "type": "module",
6
+ "bin": {
7
+ "create-benjamin": "./bin/index.js"
8
+ },
9
+ "keywords": [
10
+ "cli",
11
+ "scaffolding",
12
+ "react",
13
+ "node",
14
+ "mysql"
15
+ ],
16
+ "author": "Benjamin",
17
+ "license": "MIT",
18
+ "dependencies": {
19
+ "chalk": "^5.3.0",
20
+ "execa": "^8.0.1",
21
+ "fs-extra": "^11.2.0",
22
+ "inquirer": "^9.2.15",
23
+ "ora": "^8.0.1"
24
+ }
25
+ }
File without changes
File without changes