Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web target to pkg builder in makefile #39

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Under construction.

## [0.4.2] - 2023-01-17

### Added

- Add `wasm-pack build -t web` to the `Makefile` for use in web pages without a wasm aware bundler.


## [0.4.1] - 2022-10-22

Expand Down
3 changes: 3 additions & 0 deletions nucypher-core-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ pkg: src
# Build for both targets
wasm-pack build -t bundler -d pkg/pkg-bundler
wasm-pack build -t nodejs -d pkg/pkg-node
wasm-pack build -t web -d pkg/pkg-web

# Clean-up non-essential files
(cd pkg/pkg-bundler && rm package.json README.md .gitignore LICENSE)
(cd pkg/pkg-node && rm package.json README.md .gitignore LICENSE)
(cd pkg/pkg-web && rm package.json README.md .gitignore LICENSE)

# Types are duplicated, clean them up to avoid confusion
mv pkg/pkg-node/nucypher_core_wasm.d.ts pkg/
rm pkg/pkg-bundler/nucypher_core_wasm.d.ts
rm pkg/pkg-web/nucypher_core_wasm.d.ts

# Copy template
cp package.template.json pkg/package.json
Expand Down
3 changes: 3 additions & 0 deletions nucypher-core-wasm/package.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"pkg-bundler/*.wasm",
"pkg-bundler/*.ts",
"pkg-bundler/*.js",
"pkg-web/*.wasm",
"pkg-web/*.ts",
"pkg-web/*.js",
"*.ts",
"*.js"
],
Expand Down