generator-bitloops 0.3.19 → 0.3.20
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/package.json +1 -1
- package/setup/index.js +6 -22
package/package.json
CHANGED
package/setup/index.js
CHANGED
|
@@ -170,32 +170,16 @@ export default class extends Generator {
|
|
|
170
170
|
})[0];
|
|
171
171
|
|
|
172
172
|
if (!latest90) {
|
|
173
|
-
throw new Error('No stable 9.0.x versions found.');
|
|
173
|
+
throw new Error('No stable 9.0.x versions found.');
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// Log the chosen version (optional)
|
|
177
176
|
this.log(`Latest stable 9.0 version: ${latest90}`);
|
|
178
|
-
|
|
179
|
-
spawnSync('npx', [
|
|
180
|
-
'-y',
|
|
181
|
-
`storybook@${latest90}`,
|
|
182
|
-
'init',
|
|
183
|
-
'--no-dev',
|
|
184
|
-
'--yes', // Skip all prompts
|
|
185
|
-
'--type', 'nextjs', // Specify Next.js as the framework
|
|
186
|
-
], { stdio: 'inherit', cwd: this.destinationRoot() });
|
|
177
|
+
//Initializing sb with nextjs+vite
|
|
178
|
+
spawnSync('npx', ['-y', 'storybook@latest', 'init', '--no-dev', '--yes', '--type', 'nextjs', '--builder', 'vite'], { stdio: 'inherit', cwd: this.destinationRoot() });
|
|
187
179
|
this.log('Storybook installed!');
|
|
188
|
-
|
|
189
|
-
spawnSync('npm', [
|
|
190
|
-
|
|
191
|
-
'--save-dev',
|
|
192
|
-
'@storybook/react-vite'
|
|
193
|
-
], { stdio: 'inherit', cwd: this.destinationRoot() });
|
|
194
|
-
this.log('@storybook/react-vite installed!');
|
|
195
|
-
// if (this.options.tailwind && this.options.storybook) {
|
|
196
|
-
// Tailwind CSS specific setup for older versions of Storybook
|
|
197
|
-
// this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']);
|
|
198
|
-
// }
|
|
180
|
+
//Verifies the correct nextjs-vite framework is used
|
|
181
|
+
spawnSync('npm', ['install', '--save-dev', '@storybook/nextjs-vite@^9'], { stdio: 'inherit', cwd: this.destinationRoot() });
|
|
182
|
+
this.log('@storybook/nextjs-vite installed!');
|
|
199
183
|
}
|
|
200
184
|
};
|
|
201
185
|
|