File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,20 @@ function validateStorybookUrl(url) {
5454} ;
5555
5656async function validateStorybookDir ( dir ) {
57- // verify the storybook static directory exists
57+ // verify the directory exists
5858 if ( ! fs . existsSync ( dir ) ) {
5959 console . log ( `[smartui] Error: No directory found: ${ dir } ` ) ;
6060 process . exit ( 1 ) ;
6161 }
62+ // Verify project.json and stories.json exist to confirm it's a storybook-static dir
63+ if ( ! fs . existsSync ( dir + '/index.html' ) ) {
64+ console . log ( `[smartui] Given directory is not a storybook static directory. Error: No index.html found` ) ;
65+ process . exit ( 1 ) ;
66+ }
67+ if ( ! fs . existsSync ( dir + '/stories.json' ) ) {
68+ console . log ( `[smartui] Given directory is not a storybook static directory. Error: No stories.json found` ) ;
69+ process . exit ( 1 ) ;
70+ }
6271} ;
6372
6473async function validateLatestBuild ( options ) {
You can’t perform that action at this time.
0 commit comments