Skip to content

Commit

Permalink
Add web target to pkg builder in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
theref committed Jan 17, 2023
1 parent 5710d7d commit ffdf088
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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

0 comments on commit ffdf088

Please sign in to comment.