create-modern-react 2.3.5 → 2.3.6

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/bin/index.js CHANGED
@@ -9,10 +9,11 @@ program
9
9
  .description(
10
10
  'Create production-ready React + TypeScript + Tailwind applications in seconds'
11
11
  )
12
- .version('2.0.0')
12
+ .version('2.3.5')
13
13
  .argument('[project-name]', 'name of the project')
14
14
  .option('--skip-install', 'skip dependency installation')
15
15
  .option('--skip-git', 'skip git initialization')
16
+ .option('--no-scripts', 'skip all lifecycle scripts (skills extraction + npm scripts)')
16
17
  .action(async (projectName, options) => {
17
18
  try {
18
19
  await createProject(projectName, options);
package/lib/install.js CHANGED
@@ -69,27 +69,33 @@ async function getAvailablePackageManager(preferredManager) {
69
69
  }
70
70
 
71
71
  // Get install command and args for package manager
72
- function getInstallCommand(packageManager) {
72
+ function getInstallCommand(packageManager, noScripts = false) {
73
+ const ignoreScriptsFlag = noScripts ? ['--ignore-scripts'] : [];
74
+
73
75
  switch (packageManager) {
74
76
  case 'yarn':
75
- return { command: 'yarn', args: ['install'] };
77
+ return { command: 'yarn', args: ['install', ...ignoreScriptsFlag] };
76
78
  case 'pnpm':
77
- return { command: 'pnpm', args: ['install'] };
79
+ return { command: 'pnpm', args: ['install', ...ignoreScriptsFlag] };
78
80
  case 'npm':
79
81
  default:
80
- return { command: 'npm', args: ['install'] };
82
+ return { command: 'npm', args: ['install', ...ignoreScriptsFlag] };
81
83
  }
82
84
  }
83
85
 
84
86
  async function installDependencies(config) {
85
- const { projectPath, packageManager: preferredManager, projectName } = config;
87
+ const { projectPath, packageManager: preferredManager, projectName, noScripts } = config;
86
88
 
87
89
  console.log(chalk.blue('\nšŸ“¦ Installing dependencies...'));
88
90
 
89
91
  try {
90
92
  // Get the best available package manager
91
93
  const availableManager = await getAvailablePackageManager(preferredManager);
92
- const { command, args } = getInstallCommand(availableManager);
94
+ const { command, args } = getInstallCommand(availableManager, noScripts);
95
+
96
+ if (noScripts) {
97
+ console.log(chalk.yellow('āš ļø Running with --ignore-scripts (lifecycle scripts disabled)'));
98
+ }
93
99
 
94
100
  // Update config with actual package manager used
95
101
  config.actualPackageManager = availableManager;
package/lib/prompts.js CHANGED
@@ -163,7 +163,9 @@ async function createProject(projectName, options) {
163
163
  useHusky: optionalFeatures.includes('husky'),
164
164
  // Flags
165
165
  initGit,
166
- installDeps
166
+ installDeps,
167
+ // Security: skip lifecycle scripts when --no-scripts is passed
168
+ noScripts: options.scripts === false
167
169
  };
168
170
 
169
171
  // ─────────────────────────────────────────────────────────────
@@ -178,7 +180,11 @@ async function createProject(projectName, options) {
178
180
  console.log(chalk.cyan('│') + chalk.gray(` ${config.useAntd ? 'Ant Design v5' : 'Shadcn/ui components'} `) + chalk.cyan('│'));
179
181
  console.log(chalk.cyan('│') + chalk.gray(' Wouter routing + Axios ') + chalk.cyan('│'));
180
182
  console.log(chalk.cyan('│') + chalk.gray(' Lucide icons + ESLint + Prettier ') + chalk.cyan('│'));
181
- console.log(chalk.cyan('│') + chalk.magenta(' šŸ¤– Claude Code AI Skills ') + chalk.cyan('│'));
183
+ if (config.noScripts) {
184
+ console.log(chalk.cyan('│') + chalk.yellow(' šŸ”’ Claude Code AI Skills (skipped) ') + chalk.cyan('│'));
185
+ } else {
186
+ console.log(chalk.cyan('│') + chalk.magenta(' šŸ¤– Claude Code AI Skills ') + chalk.cyan('│'));
187
+ }
182
188
  console.log(chalk.cyan('ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤'));
183
189
  console.log(chalk.cyan('│') + chalk.white(' Optional Features: ') + chalk.cyan('│'));
184
190
  console.log(chalk.cyan('│') + ` Redux Toolkit: ${config.useRedux ? chalk.green('āœ“') : chalk.gray('āœ—')} ` + chalk.cyan('│'));
@@ -204,6 +210,14 @@ async function createProject(projectName, options) {
204
210
  const runCmd = pm === 'npm' ? 'npm run' : pm;
205
211
 
206
212
  console.log(chalk.green.bold(`\nāœ… Project "${projectName}" created successfully!\n`));
213
+
214
+ // Show note if --no-scripts was used
215
+ if (config.noScripts) {
216
+ console.log(chalk.yellow('ā„¹ļø Note: --no-scripts was used\n'));
217
+ console.log(chalk.gray(' • Claude Code AI skills were not included'));
218
+ console.log(chalk.gray(' • Dependency lifecycle scripts were skipped\n'));
219
+ }
220
+
207
221
  console.log(chalk.white('Next steps:\n'));
208
222
  console.log(chalk.gray(` cd ${projectName}`));
209
223
  if (!installDeps) {
package/lib/setup.js CHANGED
@@ -20,9 +20,16 @@ async function setupProject(config) {
20
20
  const templatePath = path.join(__dirname, '../templates/base');
21
21
  await fs.copy(templatePath, projectPath);
22
22
 
23
- // Step 2.5: Extract Claude Code AI skills from archive
24
- console.log(chalk.gray(' Including Claude Code AI skills (.claude/skills)...'));
25
- await extractSkillsArchive(projectPath);
23
+ // Step 2.5: Extract Claude Code AI skills from archive (unless --no-scripts)
24
+ if (config.noScripts) {
25
+ console.log(chalk.gray(' Skipping Claude Code AI skills (--no-scripts)...'));
26
+ // Remove the archive since we're not extracting it
27
+ const archivePath = path.join(projectPath, '.claude/skills.tar.gz');
28
+ await fs.remove(archivePath);
29
+ } else {
30
+ console.log(chalk.gray(' Including Claude Code AI skills (.claude/skills)...'));
31
+ await extractSkillsArchive(projectPath);
32
+ }
26
33
 
27
34
  // Step 3: Handle Antd vs Shadcn/ui
28
35
  if (config.useAntd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-modern-react",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "Create production-ready React + TypeScript + Tailwind applications in seconds",
5
5
  "main": "bin/index.js",
6
6
  "bin": {