create-ts-express-app 1.0.2 → 1.2.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/Readme.md +2 -3
- package/bin/cli.js +13 -3
- package/package.json +1 -1
- package/template/package.json +2 -6
package/Readme.md
CHANGED
@@ -21,11 +21,10 @@ A clean, production-ready TypeScript backend template for Node.js applications w
|
|
21
21
|
|
22
22
|
### Installation
|
23
23
|
|
24
|
-
1.
|
24
|
+
1. Make sure you are in the correct folder:
|
25
25
|
|
26
26
|
```bash
|
27
|
-
|
28
|
-
cd ts-express
|
27
|
+
cd your-folder-name
|
29
28
|
```
|
30
29
|
|
31
30
|
2. Install dependencies:
|
package/bin/cli.js
CHANGED
@@ -10,7 +10,7 @@ const projectName = process.argv[2] || 'ts-express-app';
|
|
10
10
|
const targetDir = path.join(process.cwd(), projectName);
|
11
11
|
|
12
12
|
// Source template directory (relative to this script)
|
13
|
-
const templateDir = path.join(__dirname, '..', '
|
13
|
+
const templateDir = path.join(__dirname, '..', 'template');
|
14
14
|
|
15
15
|
console.log('Debug info:');
|
16
16
|
console.log(`Script location: ${__dirname}`);
|
@@ -41,8 +41,18 @@ async function createProject() {
|
|
41
41
|
try {
|
42
42
|
await fs.copy(templateDir, targetDir);
|
43
43
|
console.log('Template files copied successfully.');
|
44
|
-
|
45
|
-
|
44
|
+
// Add this after copying the template files:
|
45
|
+
await fs.writeFile(
|
46
|
+
path.join(targetDir, '.gitignore'),
|
47
|
+
`# Generated .gitignore file
|
48
|
+
node_modules/
|
49
|
+
dist/
|
50
|
+
.env
|
51
|
+
.DS_Store
|
52
|
+
npm-debug.log
|
53
|
+
yarn-error.log
|
54
|
+
`
|
55
|
+
)
|
46
56
|
const packageJsonPath = path.join(targetDir, 'package.json');
|
47
57
|
if (fs.existsSync(packageJsonPath)) {
|
48
58
|
const packageJson = await fs.readJson(packageJsonPath);
|
package/package.json
CHANGED
package/template/package.json
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-ts-express-kit",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"main": "index.js",
|
5
|
-
"bin": {
|
6
|
-
"create-ts-express-kit": "./create.js"
|
7
|
-
},
|
8
5
|
"scripts": {
|
9
6
|
"build": "tsc",
|
10
7
|
"start": "node dist/index.js",
|
@@ -30,8 +27,7 @@
|
|
30
27
|
"dependencies": {
|
31
28
|
"@types/express": "^5.0.1",
|
32
29
|
"dotenv": "^16.5.0",
|
33
|
-
"express": "^5.1.0"
|
34
|
-
"ncp": "^2.0.0"
|
30
|
+
"express": "^5.1.0"
|
35
31
|
},
|
36
32
|
"repository": {
|
37
33
|
"type": "git",
|