Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Apr 15, 2024
1 parent 35e09ad commit e2ac823
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class Package {
#isGitPackage;
#config;
#cliConfig;
#docsConfig;
#workspaces;
#subPackages;
#git;
Expand Down Expand Up @@ -188,26 +187,6 @@ export default class Package {
return this.#subPackages;
}

get docsConfig () {
if ( this.#docsConfig === undefined ) {
if ( fs.existsSync( this.root + "/docs/.docs.config.yaml" ) ) {
this.#docsConfig = readConfig( this.root + "/docs/.docs.config.yaml" );

this.#docsConfig._location = "docs";
}
else if ( fs.existsSync( this.root + "/.docs.config.yaml" ) ) {
this.#docsConfig = readConfig( this.root + "/.docs.config.yaml" );

this.#docsConfig._location = "root";
}
else {
this.#docsConfig = null;
}
}

return this.#docsConfig;
}

get wiki () {
if ( !this.#wiki ) {
this.#wiki = new Wiki( this );
Expand Down Expand Up @@ -430,6 +409,7 @@ export default class Package {
return runner.plan( options, true );
}

// XXX
async updateMetadata ( { force } = {} ) {
env.loadUserEnv();

Expand All @@ -440,6 +420,7 @@ export default class Package {
const config = readConfig( pkg.root + "/package.json" );

// homepage
// XXX
if ( !config.homepage || force ) config.homepage = ( pkg.docsConfig && upstream.docsUrl ) || upstream.homeUrl;

// bugs
Expand Down

0 comments on commit e2ac823

Please sign in to comment.