create-next-rkk 2.0.0 ā 2.0.2
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/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function cleanupProjectDir(projectPath) {
|
|
|
72
72
|
program
|
|
73
73
|
.name('create-next-rkk')
|
|
74
74
|
.description('Create a new Next.js app with rkk-next pre-configured')
|
|
75
|
-
.version('2.0.
|
|
75
|
+
.version('2.0.2')
|
|
76
76
|
.argument('[project-name]', 'name of your project')
|
|
77
77
|
.action(async (projectName) => {
|
|
78
78
|
console.log(chalk_1.default.bold.cyan('\nš Create RKK Next.js App\n'));
|
|
@@ -119,18 +119,20 @@ program
|
|
|
119
119
|
// Step 1: Create Next.js app
|
|
120
120
|
const spinner = (0, ora_1.default)('Creating Next.js application...').start();
|
|
121
121
|
try {
|
|
122
|
-
// Use create-next-app with all options specified to avoid prompts
|
|
122
|
+
// Use create-next-app with all options specified to avoid prompts.
|
|
123
|
+
// --yes tells npx to auto-install create-next-app without asking.
|
|
123
124
|
const createNextAppCmd = [
|
|
124
125
|
'npx',
|
|
126
|
+
'--yes',
|
|
125
127
|
'create-next-app@latest',
|
|
126
128
|
targetDir,
|
|
127
129
|
answers.typescript ? '--typescript' : '--js',
|
|
128
130
|
'--eslint',
|
|
129
131
|
'--no-tailwind',
|
|
130
132
|
'--src-dir',
|
|
131
|
-
'--app',
|
|
133
|
+
answers.router === 'app' ? '--app' : '--no-app',
|
|
132
134
|
'--import-alias', '@/*',
|
|
133
|
-
'--no-git'
|
|
135
|
+
'--no-git',
|
|
134
136
|
].join(' ');
|
|
135
137
|
activeStep = 'create-app';
|
|
136
138
|
(0, child_process_1.execSync)(createNextAppCmd, {
|
|
@@ -147,7 +149,7 @@ program
|
|
|
147
149
|
if (answers.installDeps) {
|
|
148
150
|
activeStep = 'install-rkk';
|
|
149
151
|
spinner.start('Installing rkk-next...');
|
|
150
|
-
(0, child_process_1.execSync)('npm install rkk-next', {
|
|
152
|
+
(0, child_process_1.execSync)('npm install rkk-next --legacy-peer-deps', {
|
|
151
153
|
stdio: 'inherit',
|
|
152
154
|
cwd: projectPath
|
|
153
155
|
});
|