mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-28 06:20:11 +00:00
chore(docs): minify api-typedoc generated json (#461)
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user