Skip to content

Commit

Permalink
rename tsconfigJsonPath to tsconfigFilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Jan 30, 2023
1 parent add44ae commit 9c78223
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -2,4 +2,4 @@

## 1.0.0 - 2023-01-30

- Added `bundleDts()` function with `tsconfigJsonPath`, `entry`, `include`, `exclude` and `outFile` options
- Added `bundleDts()` function with `tsconfigFilePath`, `entry`, `include`, `exclude` and `outFile` options
10 changes: 5 additions & 5 deletions src/index.ts
Expand Up @@ -15,7 +15,7 @@ export interface BundleDtsOptions {
*
* @default 'tsconfig.json'
*/
tsconfigJsonPath?: string;
tsconfigFilePath?: string;
/**
* Entry file to bundle (no extension)
*
Expand Down Expand Up @@ -48,7 +48,7 @@ export interface BundleDtsOptions {
* @see https://api-extractor.com/pages/setup/configure_rollup/
*/
export async function bundleDts({
tsconfigJsonPath = join(process.cwd(), 'tsconfig.json'),
tsconfigFilePath = join(process.cwd(), 'tsconfig.json'),
entry = 'index',
include = 'src/**/*.{ts,tsx}',
exclude = ['*.test.ts', '*.spec.ts', '*.test.tsx', '*.spec.tsx'],
Expand All @@ -61,7 +61,7 @@ export async function bundleDts({
// Read tsconfig.json
let tsconfig = {};
try {
tsconfig = await readFile(tsconfigJsonPath, 'utf-8');
tsconfig = await readFile(tsconfigFilePath, 'utf-8');
} catch (e) {
//
}
Expand All @@ -85,7 +85,7 @@ export async function bundleDts({

// Convert tsconfig.json paths (alias) to relative (real) path
await replaceTscAliasPaths({
configFile: tsconfigJsonPath,
configFile: tsconfigFilePath,
declarationDir: rawDir,
outDir: rawDir,
});
Expand All @@ -98,7 +98,7 @@ export async function bundleDts({
mainEntryPointFilePath: rawEntry,
projectFolder: process.cwd(),
compiler: {
tsconfigFilePath: tsconfigJsonPath,
tsconfigFilePath,
},
dtsRollup: {
enabled: true,
Expand Down

0 comments on commit 9c78223

Please sign in to comment.