Skip to content

Commit d1f88e5

Browse files
committed
Updates
1 parent 265d245 commit d1f88e5

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
"description": "uniform interface for accessing binary data from local files, remote HTTP resources, and browser Blob data",
44
"version": "2.0.3",
55
"type": "module",
6+
"module": "./esm/index.js",
67
"main": "./esm/index.js",
78
"exports": {
89
".": {
910
"import": "./esm/index.js",
10-
"require": "./dist/index.js"
11-
},
12-
"./localFile.js": {
13-
"import": "./esm/localFile.js",
14-
"require": "./dist/localFile.js",
15-
"browser": null
11+
"node": {
12+
"import": "./esm/indexWithLocalFile.js",
13+
"require": "./dist/indexWithLocalFile.js"
14+
}
1615
}
1716
},
1817
"repository": "GMOD/generic-filehandle2",
@@ -26,16 +25,20 @@
2625
"node": ">=14"
2726
},
2827
"files": [
28+
"dist",
2929
"esm",
3030
"src"
3131
],
3232
"scripts": {
3333
"test": "vitest",
3434
"coverage": "yarn test --coverage",
3535
"lint": "eslint --report-unused-disable-directives --max-warnings 0 src test",
36-
"clean": "rimraf esm",
36+
"clean": "rimraf dist esm",
3737
"prebuild": "yarn clean",
38-
"build": "tsc --outDir esm",
38+
"build:esm": "tsc --outDir esm",
39+
"build:es5": "tsc --module commonjs --outDir dist",
40+
"build": "yarn build:esm && yarn build:es5",
41+
"postbuild:es5": "echo '{\"type\": \"commonjs\"}' > dist/package.json",
3942
"preversion": "yarn lint && yarn test --run && yarn build",
4043
"postversion": "git push --follow-tags"
4144
},

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ export * from './filehandle.ts'
22

33
export { default as BlobFile } from './blobFile.ts'
44
export { default as RemoteFile } from './remoteFile.ts'
5-
export { default as LocalFile } from './localFile.ts'
65

76
export { type GenericFilehandle } from './filehandle.ts'

src/indexWithLocalFile.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export * from './filehandle.ts'
2+
3+
export { default as BlobFile } from './blobFile.ts'
4+
export { default as RemoteFile } from './remoteFile.ts'
5+
export { default as LocalFile } from './localFile.ts'
6+
7+
export { type GenericFilehandle } from './filehandle.ts'

0 commit comments

Comments
 (0)