chore: config overhaul

This commit is contained in:
iCrawl
2023-08-22 01:33:47 +02:00
parent 5d7c59c301
commit 1e3aed0d97
131 changed files with 353 additions and 114 deletions

View File

@@ -1,3 +1,4 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"extends": "../../.eslintrc.json"
}

View File

@@ -3,7 +3,7 @@
import process from 'node:process';
import { createCommand } from 'commander';
import packageFile from '../package.json';
import { build } from './index.js';
import { build } from '../src/index.js';
export interface CLIOptions {
custom: string;

View File

@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/docgen",
"version": "0.12.1",
"description": "The docs.json generator for discord.js and its related projects",
@@ -9,7 +10,22 @@
"fmt": "yarn format",
"prepack": "yarn format && yarn build"
},
"bin": "./dist/cli.js",
"bin": "./dist/bin/index.js",
"exports": {
".": {
"require": {
"types": "./dist/src/index.d.ts",
"default": "./dist/src/index.js"
},
"import": {
"types": "./dist/src/index.d.mts",
"default": "./dist/src/index.mjs"
}
}
},
"main": "./dist/src/index.js",
"module": "./dist/src/index.mjs",
"types": "./dist/src/index.d.ts",
"directories": {
"lib": "src"
},

View File

@@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from 'node:fs';
import { dirname, join, extname, basename, relative } from 'node:path';
import jsdoc2md from 'jsdoc-to-markdown';
import { type DeclarationReflection, Application, TSConfigReader } from 'typedoc';
import type { CLIOptions } from './cli.js';
import type { CLIOptions } from '../bin/index.js';
import { Documentation } from './documentation.js';
import type { RootTypes, ChildTypes, CustomDocs } from './interfaces/index.js';

View File

@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true

View File

@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["src/**/*.ts"]
"include": ["src/**/*.ts", "bin/index.ts"]
}

View File

@@ -1,9 +1,7 @@
import { createTsupConfig } from '../../tsup.config.js';
export default createTsupConfig({
entry: ['src/index.ts', 'src/cli.ts'],
dts: false,
format: 'esm',
entry: ['src/index.ts', 'bin/index.ts'],
minify: 'terser',
keepNames: false,
sourcemap: false,