@erwininteractive/mvc 0.1.2 → 0.1.3

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/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ const program = new commander_1.Command();
9
9
  program
10
10
  .name("erwinmvc")
11
11
  .description("CLI for @erwininteractive/mvc framework")
12
- .version("0.1.2");
12
+ .version("0.1.3");
13
13
  // Init command - scaffold a new application
14
14
  program
15
15
  .command("init <dir>")
@@ -32,16 +32,17 @@ async function initApp(dir, options = {}) {
32
32
  }
33
33
  // Copy app scaffold templates
34
34
  copyDirRecursive(templateDir, targetDir);
35
- // Rename dotfiles (npm doesn't publish .gitignore, so we use gitignore.txt)
36
- const gitignoreSrc = path_1.default.join(targetDir, "gitignore.txt");
37
- const gitignoreDest = path_1.default.join(targetDir, ".gitignore");
38
- if (fs_1.default.existsSync(gitignoreSrc)) {
39
- fs_1.default.renameSync(gitignoreSrc, gitignoreDest);
40
- }
41
- // Copy .env.example
42
- const envExample = (0, paths_1.getEnvExamplePath)();
43
- if (fs_1.default.existsSync(envExample)) {
44
- fs_1.default.copyFileSync(envExample, path_1.default.join(targetDir, ".env.example"));
35
+ // Rename dotfiles (npm doesn't publish dotfiles, so we use .txt extensions)
36
+ const renames = [
37
+ ["gitignore.txt", ".gitignore"],
38
+ ["env.example.txt", ".env.example"],
39
+ ];
40
+ for (const [src, dest] of renames) {
41
+ const srcPath = path_1.default.join(targetDir, src);
42
+ const destPath = path_1.default.join(targetDir, dest);
43
+ if (fs_1.default.existsSync(srcPath)) {
44
+ fs_1.default.renameSync(srcPath, destPath);
45
+ }
45
46
  }
46
47
  // Update package.json with app name and framework version
47
48
  const appPackageJson = path_1.default.join(targetDir, "package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erwininteractive/mvc",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A lightweight, full-featured MVC framework for Node.js with Express, Prisma, and EJS",
5
5
  "main": "dist/framework/index.js",
6
6
  "types": "dist/framework/index.d.ts",
@@ -0,0 +1,6 @@
1
+ DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/yourdb?schema=public"
2
+ REDIS_URL="redis://localhost:6379"
3
+ JWT_SECRET="change-me"
4
+ SESSION_SECRET="change-me-session"
5
+ PORT=3000
6
+ NODE_ENV=development