forked from forks/ffprobe-wasm-npm
Bundle browser script, add package exports, add sourcemaps
This commit is contained in:
5
build.sh
5
build.sh
@@ -9,14 +9,17 @@ rm -rf ffprobe-wasm-app/dist
|
||||
|
||||
# Build wasm
|
||||
cd ffprobe-wasm-app
|
||||
# sed -i -e 's/ffprobe-wasm\.js/ffprobe-wasm.mjs/g;s/-o dist\/ffprobe-wasm\.mjs \\/-o dist\/ffprobe-wasm.mjs -s EXPORT_NAME=ffprobe \\/' Makefile
|
||||
docker-compose run ffprobe-wasm make
|
||||
cd ..
|
||||
cp -R ffprobe-wasm-app/dist dist
|
||||
node scripts/replace.js
|
||||
cp src/*.d.* dist
|
||||
|
||||
# Build browser/node workers
|
||||
npm run build
|
||||
|
||||
# Remove unnecessary files
|
||||
rm dist/browser-vite.* dist/ffprobe-wasm.d.mts dist/ffprobe-wasm.mjs dist/worker-browser.*
|
||||
|
||||
# Copy files for npm publish
|
||||
cp package.json LICENSE README.md dist
|
||||
|
||||
Reference in New Issue
Block a user