Skip to content

Commit

Permalink
chore: minor cleanup
Browse files Browse the repository at this point in the history
chore: minor adjustments
  • Loading branch information
chrisbbreuer committed Nov 8, 2024
1 parent 2a3fe5f commit cebb8e2
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 599 deletions.
Binary file modified bun.lockb
Binary file not shown.
75 changes: 0 additions & 75 deletions commitlint.config.js

This file was deleted.

16 changes: 3 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,28 @@
"lint": "bunx eslint .",
"lint:fix": "bunx eslint . --fix",
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
"commit": "git cz",
"changelog": "bunx changelogen --output CHANGELOG.md",
"prepublishOnly": "bun run build",
"release": "bun run changelog && bunx bumpp package.json --all",
"test": "bun test",
"typecheck": "bun tsc --noEmit"
},
"dependencies": {
"@stacksjs/dtsx": "^0.2.2"
"@stacksjs/dtsx": "^0.5.0"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@stacksjs/eslint-config": "^3.8.1-beta.2",
"@types/bun": "^1.1.10",
"bumpp": "^9.6.1",
"changelogen": "^0.5.7",
"commitizen": "^4.3.1",
"cz-git": "^1.10.1",
"lint-staged": "^15.2.10",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.6.2"
},
"simple-git-hooks": {
"pre-commit": "bun lint-staged",
"commit-msg": "bunx --no -- commitlint --edit $1"
"pre-commit": "bun lint-staged"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "bunx eslint . --fix"
},
"config": {
"commitizen": {
"path": "node_modules/cz-git"
}
"*.{js,ts}": "bunx eslint . --fix"
}
}
18 changes: 10 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@ export function dts(options?: DtsGenerationOption): BunPlugin {
name: 'bun-plugin-dtsx',

async setup(build) {
const cwd = options?.cwd ?? process.cwd()
const root = options?.root ?? build.config.root
const entrypoints = options?.entrypoints ?? build.config.entrypoints
const outdir = options?.outdir ?? build.config.outdir
const keepComments = options?.keepComments ?? true
const clean = options?.clean ?? false
const tsconfigPath = options?.tsconfigPath ?? './tsconfig.json'
const cwd = options?.cwd || process.cwd()
const root = options?.root || build.config.root
const entrypoints = options?.entrypoints // || build.config.entrypoints - we are not resorting to this yet because the `bundle` dtsx option is not yet supported
const outdir = options?.outdir || build.config.outdir
const clean = options?.clean || false
const tsconfigPath = options?.tsconfigPath || './tsconfig.json'
// const keepComments = options?.keepComments || true

await generate({
...options,
cwd,
root,
entrypoints,
outdir,
keepComments,
clean,
tsconfigPath,
// keepComments,
})
},
}
}

export { generate }

export type { DtsGenerationOption }

export default dts
Loading

0 comments on commit cebb8e2

Please sign in to comment.