@@ -516,6 +516,13 @@ export class Application extends ChildableComponent<
516516 }
517517
518518 private _convertPackages ( ) : ProjectReflection | undefined {
519+ if ( ! this . options . isSet ( "entryPoints" ) ) {
520+ this . logger . error (
521+ "No entry points provided to packages mode, documentation cannot be generated."
522+ ) ;
523+ return ;
524+ }
525+
519526 const packageDirs = getPackageDirectories (
520527 this . logger ,
521528 this . options ,
@@ -535,7 +542,7 @@ export class Application extends ChildableComponent<
535542 // Generate a json file for each package
536543 for ( const dir of packageDirs ) {
537544 this . logger . info ( `Converting project at ${ nicePath ( dir ) } ` ) ;
538- const opts = origOptions . copyForPackage ( ) ;
545+ const opts = origOptions . copyForPackage ( dir ) ;
539546 // Invalid links should only be reported after everything has been merged.
540547 opts . setValue ( "validation" , { invalidLink : false } ) ;
541548 opts . read ( this . logger , dir ) ;
@@ -584,6 +591,11 @@ export class Application extends ChildableComponent<
584591 private _merge ( ) : ProjectReflection | undefined {
585592 const start = Date . now ( ) ;
586593
594+ if ( ! this . options . isSet ( "entryPoints" ) ) {
595+ this . logger . error ( "No entry points provided to merge." ) ;
596+ return ;
597+ }
598+
587599 const rootDir = deriveRootDir ( this . entryPoints ) ;
588600 const entryPoints = this . entryPoints . flatMap ( ( entry ) => {
589601 const result = glob ( entry , rootDir ) ;
@@ -605,11 +617,6 @@ export class Application extends ChildableComponent<
605617 return result ;
606618 } ) ;
607619
608- if ( entryPoints . length < 1 ) {
609- this . logger . error ( "No entry points provided to merge." ) ;
610- return ;
611- }
612-
613620 const jsonProjects = entryPoints . map ( ( path ) => {
614621 try {
615622 return JSON . parse ( readFile ( path ) ) ;
0 commit comments