fix: missing cli commands (#1478)

* fix: missing cli commands

* centralize
This commit is contained in:
Endi 2019-05-17 14:27:53 +07:00 committed by GitHub
parent be149e182f
commit 6b75bb3270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View file

@ -38,8 +38,6 @@ const SupportedHeaderFields = new Set([
'custom_edit_url',
]);
program.option('--skip-next-release').parse(process.argv);
let allSidebars;
if (fs.existsSync(`${CWD}/sidebars.json`)) {
allSidebars = require(`${CWD}/sidebars.json`);
@ -58,11 +56,7 @@ function getDocsPath() {
}
function shouldGenerateNextReleaseDocs() {
return !(
env.versioning.enabled &&
program.name() === 'docusaurus-build' &&
program.skipNextRelease
);
return !(env.versioning.enabled && program.skipNextRelease);
}
// returns map from id to object containing sidebar ordering info