Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reduce bundle size #220

Merged
merged 14 commits into from
Aug 14, 2024
12 changes: 5 additions & 7 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { basename } from 'node:path'
import { defineBuildConfig } from 'unbuild'
import fg from 'fast-glob'
import { globSync } from 'tinyglobby'

export default defineBuildConfig({
entries: [
...fg.sync('src/commands/*.ts').map(i => ({
input: i.slice(0, -3),
name: basename(i).slice(0, -3),
})),
],
entries: globSync(['src/commands/*.ts'], { expandDirectories: false }).map(i => ({
input: i.slice(0, -3),
name: basename(i).slice(0, -3),
})),
clean: true,
declaration: true,
rollup: {
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,26 @@
"lint": "eslint .",
"test": "vitest"
},
"dependencies": {
"package-manager-detector": "^0.1.1",
"tinyexec": "^0.1.4"
},
"devDependencies": {
"@antfu/eslint-config": "^2.25.0",
"@jsdevtools/ez-spawn": "^3.0.4",
"@posva/prompts": "^2.4.4",
"@types/fs-extra": "^11.0.4",
"@types/ini": "^4.1.1",
"@types/node": "^22.1.0",
"@types/which": "^3.0.4",
"bumpp": "^9.4.2",
"eslint": "^9.8.0",
"fast-glob": "^3.3.2",
"find-up": "^6.3.0",
"fs-extra": "^11.2.0",
"fzf": "^0.5.2",
"ini": "^4.1.3",
"kleur": "^4.1.5",
"picocolors": "^1.0.1",
"taze": "^0.16.3",
"terminal-link": "^3.0.0",
"tinyglobby": "^0.2.2",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"unbuild": "^2.0.0",
Expand Down
Loading