Skip to content

Commit

Permalink
feat(build): switch from rollup to tsup (#162)
Browse files Browse the repository at this point in the history
* chore(deps): update all non-major dev-dependencies

* feat: switch to tsup

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: DanCodes <[email protected]>
  • Loading branch information
renovate[bot] and dan-online authored May 7, 2024
1 parent f56079c commit f4e459d
Show file tree
Hide file tree
Showing 7 changed files with 2,007 additions and 2,104 deletions.
52 changes: 23 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,41 @@
"format": "prettier --write \"{src,tests}/**/*.ts\"",
"test": "vitest run",
"update": "yarn upgrade-interactive",
"build": "rollup -c rollup.bundle.mjs",
"build": "tsup",
"docs": "cd src/; typedoc --plugin typedoc-plugin-markdown --out ../docs ./index.ts",
"release": "npm publish",
"prepublishOnly": "rollup-type-bundler",
"husky": "husky install"
},
"devDependencies": {
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@favware/npm-deprecate": "^1.0.7",
"@favware/rollup-type-bundler": "^3.1.0",
"@sapphire/eslint-config": "~5.0.0",
"@sapphire/ts-config": "^5.0.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.8.9",
"@sapphire/eslint-config": "~5.0.4",
"@sapphire/ts-config": "^5.0.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.10",
"@types/rimraf": "^4.0.5",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitest/coverage-v8": "^1.6.0",
"dotenv": "^16.3.1",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^9.0.9",
"jest": "^29.5.0",
"jest-circus": "^29.5.0",
"lint-staged": "^15.0.1",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"lint-staged": "^15.2.2",
"prettier": "^2.8.8",
"pretty-quick": "^4.0.0",
"release-it": "^17.0.0",
"rimraf": "^5.0.1",
"rollup": "^4.1.0",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-version-injector": "^1.3.3",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typedoc": "^0.24.7",
"release-it": "^17.2.1",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^4.0.1",
"typescript": "^5.1.3",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
"files": [
Expand Down
36 changes: 0 additions & 36 deletions rollup.bundle.mjs

This file was deleted.

11 changes: 0 additions & 11 deletions src/tsconfig.json

This file was deleted.

11 changes: 3 additions & 8 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"extends": "./tsconfig.base.json",
"include": [
"src",
"tests",
"vitest.config.ts",
"rollup.bundle.mjs"
]
}
"extends": "./tsconfig.json",
"include": ["src", "tests", "vitest.config.ts", "tsup.config.ts"]
}
6 changes: 4 additions & 2 deletions tsconfig.base.json → tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"compilerOptions": {
"importHelpers": true,
"noEmitHelpers": true,
"target": "ES2021",
"target": "esnext",
"module": "ESNext",
"skipLibCheck": true
"moduleResolution": "Bundler",
"skipLibCheck": true,
"tsBuildInfoFile": ".tsbuildinfo"
}
}
13 changes: 13 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'tsup';

export default defineConfig({
clean: true,
dts: true,
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
minify: false,
skipNodeModulesBundle: true,
sourcemap: true,
keepNames: true,
treeshake: true
});
Loading

0 comments on commit f4e459d

Please sign in to comment.