Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertohuertasm/wasm-pack-npm
wasm-pack for js developers
https://github.com/robertohuertasm/wasm-pack-npm
javascript npm npm-package rust typescript wasm wasm-pack webassembly
Last synced: 12 days ago
JSON representation
wasm-pack for js developers
- Host: GitHub
- URL: https://github.com/robertohuertasm/wasm-pack-npm
- Owner: robertohuertasm
- License: mit
- Created: 2018-10-12T16:30:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T15:11:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T16:20:49.735Z (24 days ago)
- Topics: javascript, npm, npm-package, rust, typescript, wasm, wasm-pack, webassembly
- Language: TypeScript
- Size: 803 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wasm-pack-npm
[![NPM](https://nodei.co/npm/wasm-pack-npm.png)](https://nodei.co/npm/wasm-pack-npm/)
[![Build Status](https://travis-ci.org/robertohuertasm/wasm-pack-npm.svg?branch=master)](https://travis-ci.org/robertohuertasm/wasm-pack-npm)
Installs `wasm-pack` and all the needed dependencies so you can build `wasm` npm packages.
Check out the [wasm-pack documentation](https://rustwasm.github.io/wasm-pack/book/) if you want to know more.
## How to use it
Executing `npm i -g wasm-pack-npm` will automatically install `wasm-pack` and all the dependencies in your machine.
In case something goes wrong, you will be able to retry the installation by executing `wasm-pack-npm` in your terminal.
## Docker
If you plan to use it in `Docker` you'll have to set this in the `PATH`:
`export PATH=$HOME/.cargo/bin`
This is very important. If you don't use properly set the path the installation will fail.
In addition, `npm i -g wasm-pack-npm` seems to ignore the `PATH` setting, but it works if `wasm-pack-npm` is set as one of the `devDependencies` of your npm package.
## Development
While developing it is quite useful to use `npm start`. This will keep `tsc` compilling while you change the files.
## Tests
In order to execute the tests just run: `npm test`.
If you want to debug the tests and you're using `visual studio code` you'll find some `launch` settings that will help you with that:
- jest all: debugs all tests.
- jest current: only debugs the current selected test.