chore: remove the --only-update-browsers option
This commit is contained in:
parent
20c17d5470
commit
bf7dff80da
|
|
@ -39,7 +39,6 @@ run().catch(e => {
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const onlyBrowserVersions = process.argv.includes('--only-browser-versions');
|
|
||||||
|
|
||||||
/** @type {!Array<!Message>} */
|
/** @type {!Array<!Message>} */
|
||||||
const messages = [];
|
const messages = [];
|
||||||
|
|
@ -141,11 +140,10 @@ async function run() {
|
||||||
libversion: VERSION,
|
libversion: VERSION,
|
||||||
chromiumVersion: browserVersions.chromium,
|
chromiumVersion: browserVersions.chromium,
|
||||||
firefoxVersion: browserVersions.firefox,
|
firefoxVersion: browserVersions.firefox,
|
||||||
onlyBrowserVersions,
|
|
||||||
})));
|
})));
|
||||||
|
|
||||||
if (!onlyBrowserVersions) {
|
|
||||||
messages.push(...preprocessor.autocorrectInvalidLinks(PROJECT_DIR, mdSources, getRepositoryFiles()));
|
messages.push(...preprocessor.autocorrectInvalidLinks(PROJECT_DIR, mdSources, getRepositoryFiles()));
|
||||||
|
|
||||||
for (const source of mdSources.filter(source => source.hasUpdatedText()))
|
for (const source of mdSources.filter(source => source.hasUpdatedText()))
|
||||||
messages.push(Message.warning(`WARN: updated ${source.projectPath()}`));
|
messages.push(Message.warning(`WARN: updated ${source.projectPath()}`));
|
||||||
|
|
||||||
|
|
@ -155,7 +153,6 @@ async function run() {
|
||||||
const jsSources = await Source.readdir(path.join(PROJECT_DIR, 'src', 'client'), '', []);
|
const jsSources = await Source.readdir(path.join(PROJECT_DIR, 'src', 'client'), '', []);
|
||||||
messages.push(...await checkPublicAPI(page, [api], jsSources));
|
messages.push(...await checkPublicAPI(page, [api], jsSources));
|
||||||
await browser.close();
|
await browser.close();
|
||||||
}
|
|
||||||
|
|
||||||
for (const source of mdSources) {
|
for (const source of mdSources) {
|
||||||
if (!source.hasUpdatedText())
|
if (!source.hasUpdatedText())
|
||||||
|
|
@ -193,7 +190,7 @@ async function run() {
|
||||||
console.log(`${errors.length} failures, ${warnings.length} warnings.`);
|
console.log(`${errors.length} failures, ${warnings.length} warnings.`);
|
||||||
const runningTime = Date.now() - startTime;
|
const runningTime = Date.now() - startTime;
|
||||||
console.log(`DocLint Finished in ${runningTime / 1000} seconds`);
|
console.log(`DocLint Finished in ${runningTime / 1000} seconds`);
|
||||||
process.exit(clearExit || onlyBrowserVersions ? 0 : 1);
|
process.exit(clearExit ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getBrowserVersions() {
|
async function getBrowserVersions() {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Message = require('../Message');
|
const Message = require('../Message');
|
||||||
|
|
||||||
function runCommands(sources, {libversion, chromiumVersion, firefoxVersion, onlyBrowserVersions}) {
|
function runCommands(sources, {libversion, chromiumVersion, firefoxVersion}) {
|
||||||
// Release version is everything that doesn't include "-".
|
// Release version is everything that doesn't include "-".
|
||||||
const isReleaseVersion = !libversion.includes('-');
|
const isReleaseVersion = !libversion.includes('-');
|
||||||
|
|
||||||
|
|
@ -51,8 +51,6 @@ function runCommands(sources, {libversion, chromiumVersion, firefoxVersion, only
|
||||||
newText = `[](https://www.chromium.org/Home)`;
|
newText = `[](https://www.chromium.org/Home)`;
|
||||||
else if (commandName === 'firefox-version-badge')
|
else if (commandName === 'firefox-version-badge')
|
||||||
newText = `[](https://www.mozilla.org/en-US/firefox/new/)`;
|
newText = `[](https://www.mozilla.org/en-US/firefox/new/)`;
|
||||||
else if (onlyBrowserVersions)
|
|
||||||
continue;
|
|
||||||
else if (commandName === 'version')
|
else if (commandName === 'version')
|
||||||
newText = isReleaseVersion ? 'v' + libversion : 'Tip-Of-Tree';
|
newText = isReleaseVersion ? 'v' + libversion : 'Tip-Of-Tree';
|
||||||
else if (commandName === 'toc')
|
else if (commandName === 'toc')
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ Example:
|
||||||
// 5. Update docs.
|
// 5. Update docs.
|
||||||
console.log('\nUpdating documentation...');
|
console.log('\nUpdating documentation...');
|
||||||
try {
|
try {
|
||||||
process.stdout.write(execSync('npm run --silent doc -- --only-browser-versions'));
|
process.stdout.write(execSync('npm run --silent doc'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue