From 39db9b001ca675f3adb4ba8b08fe324e0bde75c8 Mon Sep 17 00:00:00 2001 From: guts Date: Thu, 4 Sep 2025 16:20:35 +0300 Subject: [PATCH 1/4] Package initialization improvements, D2C[1644] --- setup/index.js | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/setup/index.js b/setup/index.js index 0538db5..624d339 100644 --- a/setup/index.js +++ b/setup/index.js @@ -170,32 +170,16 @@ export default class extends Generator { })[0]; if (!latest90) { - throw new Error('No stable 9.0.x versions found.'); + throw new Error('No stable 9.0.x versions found.'); } - // Log the chosen version (optional) this.log(`Latest stable 9.0 version: ${latest90}`); - - spawnSync('npx', [ - '-y', - `storybook@${latest90}`, - 'init', - '--no-dev', - '--yes', // Skip all prompts - '--type', 'nextjs', // Specify Next.js as the framework - ], { stdio: 'inherit', cwd: this.destinationRoot() }); + //Initializing sb with nextjs+vite + spawnSync('npx', ['-y', 'storybook@latest', 'init', '--no-dev', '--yes', '--type', 'nextjs', '--builder', 'vite'], { stdio: 'inherit', cwd: this.destinationRoot() }); this.log('Storybook installed!'); - this.log('Installing @storybook/react-vite for Vite builder support...'); - spawnSync('npm', [ - 'install', - '--save-dev', - '@storybook/react-vite' - ], { stdio: 'inherit', cwd: this.destinationRoot() }); - this.log('@storybook/react-vite installed!'); - // if (this.options.tailwind && this.options.storybook) { - // Tailwind CSS specific setup for older versions of Storybook - // this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']); - // } + //Verifies the correct nextjs-vite framework is used + spawnSync('npm', ['install', '--save-dev', '@storybook/nextjs-vite@^9'], { stdio: 'inherit', cwd: this.destinationRoot() }); + this.log('@storybook/nextjs-vite installed!'); } }; From 40f67361c013a5f81bdfec9ba34780483ce54601 Mon Sep 17 00:00:00 2001 From: guts Date: Fri, 5 Sep 2025 11:07:42 +0300 Subject: [PATCH 2/4] Changed Bitloops versions --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f2be678..ca17902 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-bitloops", - "version": "0.3.19", + "version": "10.3.0", "description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops", "license": "MIT", "author": "Bitloops S.A.", @@ -27,6 +27,7 @@ "yeoman-generator" ], "dependencies": { + "generator-bitloops": "link:../../../Library/pnpm/global/5/node_modules/generator-bitloops", "yeoman-environment": "^4.4.3", "yeoman-generator": "^7.3.3" } From c5e9530e68788940a0a5edddf119d6de7b5c497e Mon Sep 17 00:00:00 2001 From: guts Date: Fri, 5 Sep 2025 11:15:14 +0300 Subject: [PATCH 3/4] Correct Version update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ca17902..a1f1e0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-bitloops", - "version": "10.3.0", + "version": "0.3.20", "description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops", "license": "MIT", "author": "Bitloops S.A.", From 4f0ee66ffd304c0999d5eeb681265541f98eb3ab Mon Sep 17 00:00:00 2001 From: guts Date: Fri, 5 Sep 2025 11:33:11 +0300 Subject: [PATCH 4/4] Versions and unlinking --- package-lock.json | 4 ++-- package.json | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 84ae011..44fc229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "generator-bitloops", - "version": "0.3.18", + "version": "0.3.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "generator-bitloops", - "version": "0.3.18", + "version": "0.3.20", "license": "MIT", "dependencies": { "yeoman-environment": "^4.4.3", diff --git a/package.json b/package.json index a1f1e0d..4a41c71 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "yeoman-generator" ], "dependencies": { - "generator-bitloops": "link:../../../Library/pnpm/global/5/node_modules/generator-bitloops", "yeoman-environment": "^4.4.3", "yeoman-generator": "^7.3.3" }