Skip to content

Commit ad6db36

Browse files
committed
add CJS build back at dist/cjs/index.js
1 parent a615913 commit ad6db36

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you need to write HDF5 files in javascript consider using h5wasm ([github](ht
2424
### CDN:
2525
If you want to use it as an old-style ES5 script, you can use the pre-built library in /dist/hdf5.js e.g.
2626
```html
27-
<script src="https://cdn.jsdelivr.net/npm/jsfive@0.3.7/dist/hdf5.js"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/jsfive@0.3.10/dist/browser/hdf5.js"></script>
2828
```
2929

3030
### NPM

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
22
"name": "jsfive",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"description": "A pure javascript HDF5 file reader, based on pyfive",
5-
"main": "./dist/hdf5.js",
6-
"module": "./dist/index.js",
5+
"main": "./dist/cjs/index.js",
6+
"module": "./dist/esm/index.mjs",
77
"exports": {
88
".": {
9-
"import": "./dist/index.js",
10-
"require": "./dist/hdf5.js"
9+
"import": "./dist/esm/index.mjs",
10+
"require": "./dist/cjs/index.js"
1111
}
1212
},
13-
"browser": "./dist/hdf5.js",
13+
"browser": "./dist/browser/hdf5.js",
1414
"scripts": {
15-
"build": "npm run build_browser && npm run build_esm",
16-
"build_browser": "esbuild index.js --bundle --sourcemap --target=es2020 --outfile=dist/hdf5.js --format=iife --global-name=hdf5",
17-
"build_esm": "esbuild index.js --bundle --format=esm --outfile=dist/index.js"
15+
"build": "npm run build_browser && npm run build_esm && npm run build_commonjs",
16+
"build_browser": "esbuild index.js --bundle --sourcemap --target=es2020 --outfile=dist/browser/hdf5.js --format=iife --global-name=hdf5",
17+
"build_commonjs": "esbuild index.js --bundle --sourcemap --target=es2020 --outfile=dist/cjs/index.js --format=cjs",
18+
"build_esm": "esbuild index.js --bundle --format=esm --outfile=dist/esm/index.mjs"
1819
},
1920
"repository": {
2021
"type": "git",

0 commit comments

Comments
 (0)