Skip to content

Commit 5c1c2f6

Browse files
committed
Skip Vite and build with tsc
1 parent a0d9f49 commit 5c1c2f6

7 files changed

Lines changed: 509 additions & 607 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.yarn/
2-
dist/
32
coverage/
43
node_modules/
4+
*.d.ts
5+
*.js
6+
*.js.map

eslint.config.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
/* eslint-disable @typescript-eslint/no-magic-numbers */
22
/* eslint-disable @typescript-eslint/naming-convention */
33

4-
import { defineConfig, globalIgnores } from 'eslint/config'
54
import { configs } from '@eslint/js'
5+
import { defineConfig } from 'eslint/config'
66
import tseslint from 'typescript-eslint'
77

88
export default defineConfig(
99
configs.all,
1010
tseslint.configs.all,
11-
globalIgnores([
12-
'**/coverage/',
13-
'**/dist/',
14-
'**/node_modules/'
15-
]),
11+
{
12+
ignores: [
13+
'./coverage/',
14+
'./dist/',
15+
'./node_modules/'
16+
]
17+
},
1618
{
1719
languageOptions: {
1820
parserOptions: {

package.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
{
22
"name": "readable-from-web",
3-
"type": "module",
3+
"type": "commonjs",
44
"version": "1.0.0",
55
"packageManager": "yarn@4.12.0",
66
"description": "Experimental converter from WHATWG ReadableStream to readable-stream Readable",
77
"license": "MIT",
88
"homepage": "https://github.com/comunica/readable-from-web.js",
9+
"main": "lib/index.js",
10+
"types": "lib/index.d.ts",
911
"repository": {
1012
"type": "git",
1113
"url": "git+https://github.com/comunica/readable-from-web.js.git"
1214
},
1315
"bugs": {
1416
"url": "https://github.com/comunica/readable-from-web/issues"
1517
},
16-
"exports": {
17-
".": {
18-
"import": "./dist/index.js",
19-
"require": "./dist/index.umd.cjs"
20-
}
21-
},
22-
"types": "lib/index",
2318
"files": [
24-
"dist/*"
19+
"lib/*.d.ts",
20+
"lib/*.js",
21+
"lib/*.js.map"
2522
],
2623
"scripts": {
2724
"lint": "eslint .",
28-
"build": "vite build",
25+
"build": "tsc --project ./tsconfig.build.json",
2926
"test": "vitest run --project node"
3027
},
3128
"dependencies": {
@@ -44,12 +41,6 @@
4441
"streamify-string": "^1.0.0",
4542
"typescript": "^5.0.0",
4643
"typescript-eslint": "^8.0.0",
47-
"unplugin-dts": "^1.0.0-beta.6",
48-
"vite": "*",
4944
"vitest": "^4.0.0"
50-
},
51-
"resolutions": {
52-
"rolldown": "^1.0.0-rc.7",
53-
"vite": "^8.0.0-beta.16"
5445
}
5546
}

tsconfig.build.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2023",
4+
"lib": [
5+
"ES2023",
6+
"DOM"
7+
],
8+
"module": "commonjs",
9+
"strict": true,
10+
"declaration": true,
11+
"sourceMap": true,
12+
"noImplicitAny": true,
13+
"importHelpers": false,
14+
"inlineSources": false,
15+
"removeComments": true
16+
},
17+
"include": [
18+
"./lib/*.ts"
19+
],
20+
"exclude": [
21+
"./lib/*.d.ts"
22+
]
23+
}

tsconfig.json

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
{
2-
"compilerOptions": {
3-
"target": "es2023",
4-
"lib": [
5-
"ES2023",
6-
"DOM"
7-
],
8-
"module": "preserve",
9-
"moduleResolution": "bundler",
10-
"strict": true,
11-
"noImplicitAny": true,
12-
"importHelpers": false,
13-
"inlineSources": false,
14-
"removeComments": true
15-
},
2+
"extends": "./tsconfig.build.json",
163
"include": [
174
"./*.ts",
18-
"./lib/*.ts",
19-
"./test/*.ts"
20-
],
21-
"exclude": [
22-
"./lib/*.d.ts"
5+
"lib/*.ts",
6+
"test/*.ts"
237
]
248
}

vite.config.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)