Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*
!package.json
!yarn.lock
!dist/**
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twisted",
"version": "1.80.1",
"version": "1.81.0",
"description": "Fetching riot games api data",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -9,7 +9,8 @@
"lint:fix": "eslint --fix ./src/**/*",
"test": "jest",
"test:coverage": "jest --coverage",
"build": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc --noEmit && tsup",
"example": "ts-node runExamples",
"prepublishOnly": "npm run build"
},
Expand Down Expand Up @@ -53,6 +54,7 @@
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsup": "^8.5.1",
"typescript": "^5.3.2"
},
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"strict": true,
"target": "es6",
"target": "es2021",
"module": "commonjs",
"lib": ["es2017", "es7", "es6", "dom"],
"lib": ["es2021", "dom"],
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
Expand All @@ -18,6 +18,7 @@
"test",
"example",
"runExamples.ts",
"debug.ts"
"debug.ts",
"tsup.config.ts"
]
}
18 changes: 18 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from 'tsup'

/**
* Bundles the whole library into a single minified `dist/index.js` plus a
* rolled-up `dist/index.d.ts`. Runtime dependencies (promise-queue) are kept
* external; the JSDoc on public types is preserved in the declaration file.
*/
export default defineConfig({
entry: ['src/index.ts'],
format: ['cjs'],
target: 'node18',
platform: 'node',
dts: true,
minify: true,
sourcemap: false,
clean: true,
treeshake: true
})
Loading
Loading