create-my-app-template 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/index.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "fs-extra";
4
+ import path from "path";
5
+ import prompts from "prompts";
6
+ import { fileURLToPath } from "url";
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+ const targetDir = process.cwd();
11
+
12
+ const response = await prompts({
13
+ type: 'text',
14
+ name: 'projectName',
15
+ message: 'Project name:',
16
+ initial: 'my-app'
17
+ });
18
+
19
+ const templateDir = path.join(__dirname, "template");
20
+
21
+ await fs.copy(templateDir, path.join(targetDir, response.projectName));
22
+
23
+ console.log("✔ Project created successfully!");
24
+ console.log(`cd ${response.projectName}`);
25
+ console.log("npm install");
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "create-my-app-template",
3
+ "version": "1.0.0",
4
+ "description": "Test template.",
5
+ "bin": {
6
+ "my-app-template": "index.js"
7
+ },
8
+ "type": "module",
9
+ "dependencies": {
10
+ "prompts": "^2.4.2",
11
+ "fs-extra": "^11.1.0"
12
+ }
13
+ }
@@ -0,0 +1 @@
1
+ This is a test!