chore(docs): minify api-typedoc generated json (#461)

This commit is contained in:
Vlad Frangu
2022-05-31 02:16:29 +03:00
committed by GitHub
parent 15fcd1b2a8
commit b3736d8012
3 changed files with 9 additions and 275347 deletions

View File

@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */
import { execSync } from 'node:child_process';
import { readFile } from 'node:fs/promises';
import { readFile, writeFile } from 'node:fs/promises';
const cwd = new URL('../website/', import.meta.url);
const json = JSON.parse(await readFile(new URL('../package.json', import.meta.url), { encoding: 'utf8' }));
@@ -10,4 +10,10 @@ console.log(`⌛ Creating website version for ${json.version}`);
execSync(`npm run docusaurus docs:version ${json.version}`, { cwd, encoding: 'utf8' });
execSync(`npm run docusaurus api:version ${json.version}`, { cwd, encoding: 'utf8' });
const bigJsonPath = new URL(`../website/versioned_docs/version-${json.version}/api-typedoc.json`, import.meta.url);
const parsed = JSON.parse(await readFile(bigJsonPath, { encoding: 'utf8' }));
await writeFile(bigJsonPath, JSON.stringify(parsed));
console.log(`✅ Done! Website version created for ${json.version}`);

View File

@@ -150,7 +150,7 @@ const config = {
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:creator', content: '@WolfgalVlad' },
{ name: 'twitter:site', content: '@WolfgalVlad' },
{ name: 'twitter:title', content: Title },
{ name: 'twitter:title', content: 'discord-api-types - Imagine typings' },
{ name: 'twitter:description', content: Description },
{ name: 'url', content: BaseUrl },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },

File diff suppressed because one or more lines are too long