- Fork this repository on GitHub
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change
- Run the tests, ensuring they all pass
- Submit a Pull Request using GitHub
You should test your changes using both the test suite and manually in a node and browser environment.
If your change extends or changes the public API, you should also update the documentation.
You simply need to run the following npm script to build the package:
yarn build
This is a shorthand for the following commands:
yarn build:prep # downloads the MuPDF source code to the local tmp directory
yarn build:wasm # builds the WASM library using Docker and emscripten
yarn build:tsc # builds the TypeScript wrapper
yarn build:cp # copies the MuPDF type declarations to the dist folder
You can run the tests using the following npm script:
yarn test
Or you can run the tests in watch mode:
yarn test:watch