Skip to content

Commit

Permalink
Ensure versions.json is distributed
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 1, 2023
1 parent b98d72a commit bd21b3d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dist/

# User-specific stuff
package-lock.json
versions.json
build/deps/
build/target/
build/enums.cpp
Expand Down
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,5 +537,8 @@ EOF

# Copy dynamic loadable modules
module_dir=$(printf '%s\n' $TARGET/lib/vips-modules-* | sort -n | tail -1)
[ -d "$module_dir" ] && cp $module_dir/* $SOURCE_DIR/lib/ || true
[ -d "$module_dir" ] && cp $module_dir/* $SOURCE_DIR/lib || true

# Copy versions.json
cp $TARGET/versions.json $SOURCE_DIR
)
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
"author": "Kleis Auke Wolthuizen",
"type": "commonjs",
"exports": {
"browser": {
"import": "./lib/vips-es6.js",
"require": "./lib/vips.js"
".": {
"browser": {
"import": "./lib/vips-es6.js",
"require": "./lib/vips.js"
},
"node": {
"import": "./lib/vips-node.mjs",
"require": "./lib/vips-node.js"
},
"default": "./lib/vips.js"
},
"node": {
"import": "./lib/vips-node.mjs",
"require": "./lib/vips-node.js"
},
"default": "./lib/vips.js"
"./versions": "./versions.json"
},
"main": "lib/vips-node.js",
"browser": "lib/vips.js",
Expand All @@ -35,7 +38,8 @@
"lib/vips-heif.wasm",
"lib/vips-jxl.wasm",
"lib/vips-resvg.wasm",
"THIRD-PARTY-NOTICES.md"
"THIRD-PARTY-NOTICES.md",
"versions.json"
],
"scripts": {
"build": "docker build -t wasm-vips . && docker run -it --rm -v $(pwd):/src wasm-vips ./build.sh",
Expand Down

0 comments on commit bd21b3d

Please sign in to comment.