create-ej-app 21.0.0 → 25.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.
package/cli.js CHANGED
@@ -1,14 +1,11 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- const child_process_1 = require("child_process");
8
- const commander_1 = require("commander");
9
- const enquirer_1 = require("enquirer");
10
- const fs_1 = __importDefault(require("fs"));
11
- const path_1 = __importDefault(require("path"));
2
+ import { execSync } from 'child_process';
3
+ import { program } from 'commander';
4
+ import enquirer from 'enquirer';
5
+ import fs from 'fs';
6
+ import path from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
9
  const detectPackageManager = () => {
13
10
  const userAgent = process.env.npm_config_user_agent;
14
11
  if (userAgent) {
@@ -45,8 +42,8 @@ const getDevCommand = (packageManager) => {
45
42
  return 'npm run dev';
46
43
  }
47
44
  };
48
- commander_1.program.action(async () => {
49
- const response = await (0, enquirer_1.prompt)([
45
+ program.action(async () => {
46
+ const response = await enquirer.prompt([
50
47
  {
51
48
  type: 'input',
52
49
  name: 'projectName',
@@ -82,29 +79,41 @@ commander_1.program.action(async () => {
82
79
  }
83
80
  ]);
84
81
  const { projectName, description, template, git } = response;
85
- const projectDir = path_1.default.join(process.cwd(), projectName);
86
- if (fs_1.default.existsSync(projectDir)) {
82
+ const projectDir = path.join(process.cwd(), projectName);
83
+ if (fs.existsSync(projectDir)) {
87
84
  console.error(`Error: Directory '${projectName}' already exists.`);
88
85
  process.exit(1);
89
86
  }
90
- fs_1.default.mkdirSync(projectDir);
91
- const templateDir = path_1.default.join(__dirname, 'template', template);
92
- fs_1.default.cpSync(templateDir, projectDir, { recursive: true });
93
- const packageJsonFile = path_1.default.join(projectDir, 'package.json');
94
- const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonFile, 'utf-8'));
87
+ fs.mkdirSync(projectDir);
88
+ const templateDir = path.join(__dirname, 'template', template);
89
+ fs.cpSync(templateDir, projectDir, { recursive: true });
90
+ const renameGitignore = (dir) => {
91
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
92
+ const fullPath = path.join(dir, entry.name);
93
+ if (entry.isDirectory()) {
94
+ renameGitignore(fullPath);
95
+ }
96
+ else if (entry.name === 'gitignore') {
97
+ fs.renameSync(fullPath, path.join(dir, '.gitignore'));
98
+ }
99
+ }
100
+ };
101
+ renameGitignore(projectDir);
102
+ const packageJsonFile = path.join(projectDir, 'package.json');
103
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonFile, 'utf-8'));
95
104
  packageJson.name = projectName;
96
105
  packageJson.description = description;
97
- fs_1.default.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2));
98
- const envExampleFile = path_1.default.join(projectDir, '.env.example');
99
- const envExample = fs_1.default.readFileSync(envExampleFile, 'utf-8');
100
- fs_1.default.writeFileSync(path_1.default.join(projectDir, '.env'), envExample);
101
- fs_1.default.writeFileSync(path_1.default.join(projectDir, 'README.md'), `# ${projectName}
106
+ fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2));
107
+ const envExampleFile = path.join(projectDir, '.env.example');
108
+ const envExample = fs.readFileSync(envExampleFile, 'utf-8');
109
+ fs.writeFileSync(path.join(projectDir, '.env'), envExample);
110
+ fs.writeFileSync(path.join(projectDir, 'README.md'), `# ${projectName}
102
111
 
103
112
  ${description}
104
113
  `);
105
114
  if (git === 'yes') {
106
115
  try {
107
- (0, child_process_1.execSync)('git init', { cwd: projectDir, stdio: 'inherit' });
116
+ execSync('git init', { cwd: projectDir, stdio: 'inherit' });
108
117
  }
109
118
  catch (err) {
110
119
  console.error('Error initializing git repository:', err);
@@ -131,4 +140,4 @@ ${devCommand}
131
140
  Happy coding! 🚀
132
141
  `);
133
142
  });
134
- commander_1.program.parse(process.argv);
143
+ program.parse(process.argv);
package/cli.ts CHANGED
@@ -2,9 +2,12 @@
2
2
 
3
3
  import { execSync } from 'child_process'
4
4
  import { program } from 'commander'
5
- import { prompt } from 'enquirer'
5
+ import enquirer from 'enquirer'
6
6
  import fs from 'fs'
7
7
  import path from 'path'
8
+ import { fileURLToPath } from 'url'
9
+
10
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
8
11
 
9
12
  interface Response {
10
13
  projectName: string
@@ -52,7 +55,7 @@ const getDevCommand = (packageManager: string) => {
52
55
  }
53
56
 
54
57
  program.action(async () => {
55
- const response: Response = await prompt([
58
+ const response: Response = await enquirer.prompt([
56
59
  {
57
60
  type: 'input',
58
61
  name: 'projectName',
@@ -103,6 +106,18 @@ program.action(async () => {
103
106
  const templateDir = path.join(__dirname, 'template', template)
104
107
  fs.cpSync(templateDir, projectDir, { recursive: true })
105
108
 
109
+ const renameGitignore = (dir: string) => {
110
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
111
+ const fullPath = path.join(dir, entry.name)
112
+ if (entry.isDirectory()) {
113
+ renameGitignore(fullPath)
114
+ } else if (entry.name === 'gitignore') {
115
+ fs.renameSync(fullPath, path.join(dir, '.gitignore'))
116
+ }
117
+ }
118
+ }
119
+ renameGitignore(projectDir)
120
+
106
121
  const packageJsonFile = path.join(projectDir, 'package.json')
107
122
  const packageJson = JSON.parse(fs.readFileSync(packageJsonFile, 'utf-8'))
108
123
  packageJson.name = projectName
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "create-ej-app",
3
- "version": "21.0.0",
3
+ "version": "25.0.0",
4
4
  "description": "Bootstrap a next.js app with my preferred setup",
5
5
  "main": "cli.js",
6
+ "type": "module",
6
7
  "scripts": {
7
8
  "build": "tsc",
8
9
  "start": "node ."
@@ -14,10 +15,11 @@
14
15
  "create-ej-app",
15
16
  "nextjs",
16
17
  "typescript",
17
- "nextauth",
18
- "prisma",
18
+ "better-auth",
19
+ "drizzle",
19
20
  "tailwind",
20
- "shadcn"
21
+ "shadcn",
22
+ "starter"
21
23
  ],
22
24
  "author": "Ekansh Jain",
23
25
  "license": "MIT",
@@ -30,11 +32,11 @@
30
32
  },
31
33
  "homepage": "https://github.com/ejekanshjain/create-ej-app#readme",
32
34
  "dependencies": {
33
- "commander": "^14.0.3",
35
+ "commander": "^15.0.0",
34
36
  "enquirer": "^2.4.1"
35
37
  },
36
38
  "devDependencies": {
37
- "@types/node": "^25.6.2",
39
+ "@types/node": "^25.9.2",
38
40
  "typescript": "^6.0.3"
39
41
  }
40
42
  }
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ .DS_Store
3
+ .env
4
+ server
@@ -21,8 +21,8 @@
21
21
  "zod": "4.4.3"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/bun": "1.3.13",
25
- "@typescript/native-preview": "7.0.0-dev.20260508.1",
24
+ "@types/bun": "1.3.14",
25
+ "@typescript/native-preview": "7.0.0-dev.20260607.1",
26
26
  "drizzle-kit": "0.31.10",
27
27
  "postgres": "3.4.9",
28
28
  "prettier": "3.8.3",
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ .next
3
+ out
4
+ build
5
+ next-env.d.ts
6
+ .DS_Store
7
+ .env
@@ -22,54 +22,54 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@ejekanshjain/simple-email-validator": "1.0.4",
25
- "@hookform/resolvers": "5.2.2",
26
- "@next/third-parties": "16.2.6",
25
+ "@hookform/resolvers": "5.4.0",
26
+ "@next/third-parties": "16.2.7",
27
27
  "@opentelemetry/api": "1.9.1",
28
28
  "@opentelemetry/sdk-trace-base": "2.7.1",
29
29
  "@paralleldrive/cuid2": "3.3.0",
30
30
  "@react-email/render": "2.0.8",
31
31
  "@t3-oss/env-nextjs": "0.13.11",
32
- "@tanstack/react-query": "5.100.9",
32
+ "@tanstack/react-query": "5.101.0",
33
33
  "@vercel/otel": "2.1.2",
34
- "better-auth": "1.6.9",
34
+ "better-auth": "1.6.14",
35
35
  "class-variance-authority": "0.7.1",
36
36
  "clsx": "2.1.1",
37
37
  "drizzle-orm": "0.45.2",
38
- "lucide-react": "1.14.0",
39
- "next": "16.2.6",
40
- "next-safe-action": "8.5.2",
38
+ "lucide-react": "1.17.0",
39
+ "next": "16.2.7",
40
+ "next-safe-action": "8.5.3",
41
41
  "next-themes": "^0.4.6",
42
42
  "nextjs-toploader": "3.9.17",
43
- "nodemailer": "8.0.7",
43
+ "nodemailer": "8.0.10",
44
44
  "postgres": "3.4.9",
45
- "radix-ui": "1.4.3",
46
- "react": "19.2.6",
47
- "react-dom": "19.2.6",
48
- "react-hook-form": "7.75.0",
45
+ "radix-ui": "1.5.0",
46
+ "react": "19.2.7",
47
+ "react-dom": "19.2.7",
48
+ "react-hook-form": "7.78.0",
49
49
  "sonner": "^2.0.7",
50
- "tailwind-merge": "3.5.0",
50
+ "tailwind-merge": "3.6.0",
51
51
  "tw-animate-css": "1.4.0",
52
- "workflow": "4.2.4",
52
+ "workflow": "4.3.1",
53
53
  "zod": "4.4.3"
54
54
  },
55
55
  "devDependencies": {
56
- "@next/bundle-analyzer": "16.2.6",
56
+ "@next/bundle-analyzer": "16.2.7",
57
57
  "@react-email/preview-server": "5.2.10",
58
- "@tailwindcss/postcss": "4.2.4",
59
- "@types/bun": "1.3.13",
58
+ "@tailwindcss/postcss": "4.3.0",
59
+ "@types/bun": "1.3.14",
60
60
  "@types/nodemailer": "8.0.0",
61
- "@types/react": "19.2.14",
61
+ "@types/react": "19.2.17",
62
62
  "@types/react-dom": "19.2.3",
63
- "@typescript/native-preview": "7.0.0-dev.20260508.1",
63
+ "@typescript/native-preview": "7.0.0-dev.20260607.1",
64
64
  "babel-plugin-react-compiler": "1.0.0",
65
65
  "drizzle-kit": "0.31.10",
66
66
  "eslint": "9.39.4",
67
- "eslint-config-next": "16.2.6",
67
+ "eslint-config-next": "16.2.7",
68
68
  "prettier": "3.8.3",
69
69
  "prettier-plugin-organize-imports": "4.3.0",
70
70
  "prettier-plugin-tailwindcss": "0.8.0",
71
- "react-email": "6.1.1",
72
- "tailwindcss": "4.2.4",
71
+ "react-email": "6.5.0",
72
+ "tailwindcss": "4.3.0",
73
73
  "typescript": "6.0.3"
74
74
  },
75
75
  "trustedDependencies": [
@@ -1,5 +1,7 @@
1
1
  const config = {
2
- plugins: ['@tailwindcss/postcss']
2
+ plugins: {
3
+ '@tailwindcss/postcss': {}
4
+ }
3
5
  }
4
6
 
5
7
  export default config
@@ -0,0 +1,4 @@
1
+ .terraform
2
+ *.tfstate
3
+ *.tfstate.*
4
+ .terraform.lock.hcl