Skip to content

Commit

Permalink
update mdn links plugin + product docs file first and then upload
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Feb 18, 2025
1 parent 5be8eec commit 58e096a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"typedoc-plugin-coverage": "3.4.1",
"typedoc-plugin-extras": "4.0.0",
"typedoc-plugin-inline-sources": "1.2.0",
"typedoc-plugin-mdn-links": "3.3.2",
"typedoc-plugin-mdn-links": "4.0.13",
"vuepress": "2.0.0-rc.15"
},
"overrides": {
Expand Down
15 changes: 6 additions & 9 deletions tools/build_api_docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ async function main() {
const packageVersion = packageJson.version;
const packageName = packageJson.name;

if (prevVersion)
await createApiDiff(outputDirectoryFull, remotePath, baseUrl, version, prevVersion);

// delete output directory if it exists
if (fs.existsSync(outputDirectoryFull))
fs.rmSync(outputDirectoryFull, { recursive: true });
Expand All @@ -115,6 +112,9 @@ async function main() {
await produceDocs(packageDir, outputDirectoryFull);
console.log("API documentation generated at " + outputDirectoryFull);

if (prevVersion)
await createApiDiff(outputDirectoryFull, remotePath, baseUrl, version, prevVersion);

// create version file
fs.writeFileSync(outputDirectoryFull + "/" + versionFile, new Date().toISOString());

Expand Down Expand Up @@ -297,9 +297,6 @@ async function createApiDiff(outputDirectory, remotePath, baseUrl, currentVersio
console.log("API diff already exists at " + url);
return;
}

if (fs.existsSync(outputDirectory))
fs.rmSync(outputDirectory, { recursive: true });
fs.mkdirSync(outputDirectory, { recursive: true });

const cmd = `npm diff diff-ignore-all-space --diff=@needle-tools/engine@${previousVersion} --diff=@needle-tools/engine@${currentVersion} ./src ./plugins`;
Expand Down Expand Up @@ -374,9 +371,9 @@ async function createApiDiff(outputDirectory, remotePath, baseUrl, currentVersio

if (isDev) return;

console.log("Uploading API diff to " + remotePath);
await upload(outputDirectory, remotePath);
await delay(2000);
// console.log("Uploading API diff to " + remotePath);
// await upload(outputDirectory, remotePath);
// await delay(2000);

}
catch (err) {
Expand Down

0 comments on commit 58e096a

Please sign in to comment.