File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,17 @@ async function buildProject(program: Command): Promise<DocsConfig | undefined> {
141141 } )
142142
143143 // copy the apiIndex.json file to the docs directory so it can be served as a static asset
144- const apiIndexPath = join ( absoluteOutputDir , 'apiIndex.json' )
145- const docsApiIndexPath = join ( absoluteOutputDir , 'docs' , 'apiIndex.json' )
146- await copyFile ( apiIndexPath , docsApiIndexPath )
144+ try {
145+ const apiIndexPath = join ( absoluteOutputDir , 'apiIndex.json' )
146+ const docsApiIndexPath = join ( absoluteOutputDir , 'docs' , 'apiIndex.json' )
147+ await copyFile ( apiIndexPath , docsApiIndexPath )
147148
148- if ( verbose ) {
149- console . log ( 'Copied apiIndex.json to docs directory' )
149+ if ( verbose ) {
150+ console . log ( 'Copied apiIndex.json to docs directory' )
151+ }
152+ } catch ( error ) {
153+ console . error ( 'Failed to copy apiIndex.json to docs directory:' , error )
154+ throw error
150155 }
151156
152157 return config
You can’t perform that action at this time.
0 commit comments