create-dacosta-proj 1.0.2 → 1.0.4
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 +19 -0
- package/package.json +2 -21
- package/template/package.json +23 -0
- package/{src → template/src}/index.js +0 -2
- /package/{.env.template → template/.env.template} +0 -0
- /package/{devref.json → template/devref.json} +0 -0
- /package/{eslint.config.mjs → template/eslint.config.mjs} +0 -0
- /package/{jsconfig.json → template/jsconfig.json} +0 -0
- /package/{src → template/src}/config/global.js +0 -0
- /package/{src → template/src}/helpers/generateId.js +0 -0
- /package/{src → template/src}/helpers/getRedis.js +0 -0
- /package/{src → template/src}/helpers/wait.js +0 -0
package/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const projectName = process.argv[2] || '.';
|
|
8
|
+
const targetDir = path.resolve(process.cwd(), projectName);
|
|
9
|
+
const templateDir = path.join(__dirname, 'template');
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(targetDir)) fs.mkdirSync(targetDir, { recursive: true });
|
|
12
|
+
|
|
13
|
+
// Just copy everything from template/ to the new project
|
|
14
|
+
fs.cpSync(templateDir, targetDir, { recursive: true });
|
|
15
|
+
|
|
16
|
+
console.log('📦 Installing dependencies...');
|
|
17
|
+
execSync('npm install', { cwd: targetDir, stdio: 'inherit' });
|
|
18
|
+
|
|
19
|
+
console.log(`\n✅ Done! cd ${projectName} and set up your .env`);
|
package/package.json
CHANGED
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-dacosta-proj",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"bin": {
|
|
5
|
-
"create-dacosta-proj": "./
|
|
6
|
-
},
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"dev": "nodemon src/index.js",
|
|
10
|
-
"start": "node src/index.js"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"dotenv": "^17.3.1",
|
|
14
|
-
"generate-unique-id": "^2.0.3",
|
|
15
|
-
"redis": "^5.11.0",
|
|
16
|
-
"simple-supabase": "git+https://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:x-oauth-basic@github.com/itsgox/NM-Simple-Supabase.git"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"eslint": "^9.39.3",
|
|
20
|
-
"module-alias": "^2.3.4",
|
|
21
|
-
"nodemon": "^3.1.13"
|
|
22
|
-
},
|
|
23
|
-
"_moduleAliases": {
|
|
24
|
-
"@": "src"
|
|
5
|
+
"create-dacosta-proj": "./index.js"
|
|
25
6
|
}
|
|
26
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "proj-name",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "src/index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "nodemon src/index.js",
|
|
7
|
+
"start": "node src/index.js"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"dotenv": "^17.3.1",
|
|
11
|
+
"generate-unique-id": "^2.0.3",
|
|
12
|
+
"redis": "^5.11.0",
|
|
13
|
+
"simple-supabase": "git+https://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:x-oauth-basic@github.com/itsgox/NM-Simple-Supabase.git"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"eslint": "^9.39.3",
|
|
17
|
+
"module-alias": "^2.3.4",
|
|
18
|
+
"nodemon": "^3.1.13"
|
|
19
|
+
},
|
|
20
|
+
"_moduleAliases": {
|
|
21
|
+
"@": "src"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|