@imhonglu/configs
v1.0.13
Published
Shared TypeScript, API Extractor, and tsdown configuration.
Downloads
541
Readme
@imhonglu/configs
Shared TypeScript, API Extractor, and tsdown configuration for @imhonglu/new-wheels packages.
Installation
pnpm add -D @imhonglu/configsTypeScript
Extend the base configuration for general TypeScript projects or the library configuration for packages that emit declarations.
{
"extends": "@imhonglu/configs/tsconfig.lib.json"
}Available exports are tsconfig.base.json and tsconfig.lib.json.
API Extractor
{
"extends": "@imhonglu/configs/api-extractor-base.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
}tsdown
Install tsdown when using the shared build configuration.
pnpm add -D @imhonglu/configs tsdownUse the shared configuration from the package's tsdown.config.ts.
import sharedConfig from "@imhonglu/configs/tsdown.config.js";
import { defineConfig } from "tsdown";
export default defineConfig(sharedConfig);The export also provides baseConfig and declarationConfig. Use tsdown's mergeConfig to add only the platform or plugin overrides owned by the package.
import {
baseConfig,
declarationConfig,
} from "@imhonglu/configs/tsdown.config.js";
import { defineConfig, mergeConfig } from "tsdown";
export default defineConfig([
mergeConfig(baseConfig, { platform: "node" }),
declarationConfig,
]);Validation
This package has no build output or standalone tests. Changes must be validated through its consumers and the published file list.
pnpm run build
pnpm --filter @imhonglu/configs pack --dry-run