From 1160c60f700c6f434d82b2bbc4566ce76ee18222 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Sat, 18 Feb 2023 17:41:44 -0800 Subject: [PATCH] build(js): Fix wasm-pack's use of `.gitignore` Closes https://github.com/PRQL/prql/issues/1875. Not sure why this used to work and doesn't work, but the `.gitignore`s were causing no files to be added to the package. Now we hackily remove them. This event adds weight to https://github.com/PRQL/prql/issues/1836 --- prql-js/README.md | 2 +- prql-js/package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/prql-js/README.md b/prql-js/README.md index ba0606c2664a..500e55ee8d90 100644 --- a/prql-js/README.md +++ b/prql-js/README.md @@ -173,4 +173,4 @@ npm test [^1]: Though we would be very open to other approaches, given wasm-pack does not seem maintained, and we're eliding many of its features to build for three - targets. + targets. See for more details. diff --git a/prql-js/package.json b/prql-js/package.json index e3f7b8c0fc09..96ddb45d6bd9 100644 --- a/prql-js/package.json +++ b/prql-js/package.json @@ -18,9 +18,9 @@ }, "scripts": { "build": "npm run build:node && npm run build:bundler && npm run build:web", - "build:bundler": "wasm-pack build --target bundler --release --out-dir dist/bundler", - "build:node": "wasm-pack build --target nodejs --release --out-dir dist/node", - "build:web": "wasm-pack build --target no-modules --release --out-dir dist/web", + "build:bundler": "wasm-pack build --target bundler --release --out-dir dist/bundler && rm dist/bundler/.gitignore", + "build:node": "wasm-pack build --target nodejs --release --out-dir dist/node && rm dist/node/.gitignore", + "build:web": "wasm-pack build --target no-modules --release --out-dir dist/web && rm dist/web/.gitignore", "test": "wasm-pack test --firefox && mocha tests" }, "types": "dist/node/prql_js.d.ts",