@@ -97,8 +97,9 @@ export default class extends Generator {
9797 this . installStorybook = function ( ) {
9898 // Conditionally initialize Storybook
9999 if ( this . options . storybook ) {
100- this . log ( "Adding Storybook..." ) ;
101- this . spawnCommandSync ( 'npx' , [ '-y' , 'storybook@8.4' , 'init' , '--no-dev' ] ) ;
100+ this . log ( 'Installing Storybook...' ) ;
101+ this . spawnCommandSync ( 'npx' , [ '-y' , 'storybook@^8.4' , 'init' , '--no-dev' ] ) ;
102+ this . log ( 'Storybook installed!' ) ;
102103 // if (this.options.tailwind && this.options.storybook) {
103104 // Tailwind CSS specific setup for older versions of Storybook
104105 // this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']);
@@ -109,15 +110,16 @@ export default class extends Generator {
109110 this . installCypress = function ( ) {
110111 // Conditionally add Cypress
111112 if ( this . options . cypress ) {
112- this . log ( "Adding Cypress..." ) ;
113+ this . log ( 'Installing Cypress...' ) ;
113114 this . spawnCommandSync ( 'npm' , [ 'install' , '--save-dev' , 'cypress' ] ) ;
115+ this . log ( 'Cypress installed!' ) ;
114116 }
115117 }
116118
117119 this . patchFiles = async function ( ) {
118120 // Conditionally initialize Storybook
119121 if ( this . options . storybook ) {
120- this . log ( " Making Storybook changes..." ) ;
122+ this . log ( ' Making Storybook changes...' ) ;
121123 if ( this . options . tailwind ) {
122124 fs . unlinkSync ( this . destinationPath ( '.storybook/preview.ts' ) ) ;
123125 this . log ( 'Setting up Tailwind CSS with Storybook...' ) ;
@@ -211,11 +213,8 @@ export default class extends Generator {
211213
212214 async main ( ) {
213215 await this . installNextJS ( ) ;
214- this . log ( 'Installing Storybook' ) ;
215216 this . installStorybook ( ) ;
216- this . log ( 'Installing Cypress' ) ;
217217 this . installCypress ( ) ;
218- this . log ( 'Patching files' ) ;
219218 await this . patchFiles ( ) ;
220219 if ( this . options . git ) {
221220 await this . commitChanges ( ) ;
0 commit comments