create-my-framework 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.
Files changed (2) hide show
  1. package/index.js +25 -0
  2. package/package.json +16 -0
package/index.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require('child_process');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ const projectName = process.argv[2] || 'my-next-app';
8
+ const projectPath = path.join(process.cwd(), projectName);
9
+
10
+ console.log(`🚀 Creating your framework in ${projectPath}...`);
11
+
12
+ // 1. Clone your template (using a GitHub repo is easiest)
13
+ const repo = 'https://github.com/your-username/your-template-repo';
14
+ execSync(`git clone ${repo} ${projectPath}`);
15
+
16
+ // 2. Clean up
17
+ process.chdir(projectPath);
18
+ fs.rmSync(path.join(projectPath, '.git'), { recursive: true, force: true });
19
+
20
+ // 3. Install dependencies
21
+ console.log('📦 Installing dependencies...');
22
+ execSync('npm install', { stdio: 'inherit' });
23
+
24
+ console.log('✅ Success! To get started:');
25
+ console.log(` cd ${projectName} && npm run dev`);
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "create-my-framework",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "create-my-framework": "./index.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "keywords": [],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "type": "commonjs"
16
+ }