stoix 0.1.0 → 0.1.1
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 +3 -2
- package/dist/bin/index.js +5 -0
- package/package.json +1 -1
- package/template/.env +0 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ my-app/
|
|
|
47
47
|
├── vite.config.ts # Vite build configuration
|
|
48
48
|
├── vite-env.d.ts # Vite environment types
|
|
49
49
|
├── index.html # HTML entry point
|
|
50
|
-
├── .env
|
|
50
|
+
├── .env.example # Example environment variables
|
|
51
51
|
├── server/ # Express server
|
|
52
52
|
│ ├── server.ts # Server entry point
|
|
53
53
|
│ └── routes/ # Auto-loaded API routes
|
|
@@ -108,13 +108,14 @@ Examples:
|
|
|
108
108
|
|
|
109
109
|
## Environment Variables
|
|
110
110
|
|
|
111
|
-
`template/.env` includes:
|
|
111
|
+
`template/.env.example` includes:
|
|
112
112
|
|
|
113
113
|
```env
|
|
114
114
|
PORT=3000
|
|
115
115
|
NODE_ENV=development
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
Copy `.env.example` to `.env` if you want to override defaults locally.
|
|
118
119
|
`PORT` overrides the port in `stoix.config.ts`.
|
|
119
120
|
|
|
120
121
|
## Development and Production Flow
|
package/dist/bin/index.js
CHANGED
|
@@ -52,6 +52,11 @@ async function createProject(name) {
|
|
|
52
52
|
}
|
|
53
53
|
fs.copySync(templateDir, targetDir, { overwrite: false });
|
|
54
54
|
console.log(chalk.green(' + Project files created'));
|
|
55
|
+
// Never scaffold a real .env file; keep only .env.example.
|
|
56
|
+
const envFilePath = path.join(targetDir, '.env');
|
|
57
|
+
if (fs.existsSync(envFilePath)) {
|
|
58
|
+
fs.removeSync(envFilePath);
|
|
59
|
+
}
|
|
55
60
|
const gitignoreSrc = path.join(targetDir, 'gitignore');
|
|
56
61
|
const gitignoreDest = path.join(targetDir, '.gitignore');
|
|
57
62
|
if (fs.existsSync(gitignoreSrc)) {
|
package/package.json
CHANGED
package/template/.env
DELETED