create-next-rkk 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +21 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -87,16 +87,32 @@ program
87
87
  // Step 1: Create Next.js app
88
88
  const spinner = (0, ora_1.default)('Creating Next.js application...').start();
89
89
  try {
90
- const createNextAppCmd = answers.typescript
91
- ? `npx create-next-app@latest ${targetDir} --typescript --eslint --no-tailwind --src-dir --import-alias "@/*"`
92
- : `npx create-next-app@latest ${targetDir} --javascript --eslint --no-tailwind --src-dir --import-alias "@/*"`;
93
- (0, child_process_1.execSync)(createNextAppCmd, { stdio: 'inherit' });
90
+ // Use create-next-app with all options specified to avoid prompts
91
+ const createNextAppCmd = [
92
+ 'npx',
93
+ 'create-next-app@latest',
94
+ targetDir,
95
+ answers.typescript ? '--typescript' : '--js',
96
+ '--eslint',
97
+ '--no-tailwind',
98
+ '--src-dir',
99
+ '--app',
100
+ '--import-alias', '@/*',
101
+ '--no-git'
102
+ ].join(' ');
103
+ (0, child_process_1.execSync)(createNextAppCmd, {
104
+ stdio: 'pipe',
105
+ encoding: 'utf-8'
106
+ });
94
107
  spinner.succeed('Next.js application created!');
95
108
  // Step 2: Install rkk-next
96
109
  if (answers.installDeps) {
97
110
  spinner.start('Installing rkk-next...');
98
111
  process.chdir(targetDir);
99
- (0, child_process_1.execSync)('npm install rkk-next', { stdio: 'inherit' });
112
+ (0, child_process_1.execSync)('npm install rkk-next', {
113
+ stdio: 'pipe',
114
+ encoding: 'utf-8'
115
+ });
100
116
  spinner.succeed('rkk-next installed!');
101
117
  }
102
118
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-next-rkk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "CLI tool to create Next.js apps with rkk-next pre-configured",
5
5
  "author": "Rohit Kumar Kundu",
6
6
  "license": "MIT",