Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (38 loc) · 1.22 KB

CONTRIBUTING.md

File metadata and controls

55 lines (38 loc) · 1.22 KB

Contributing to this project

How to contribute

  1. Fork this repository on GitHub
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change
  5. Run the tests, ensuring they all pass
  6. 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.

Building this package

Prerequisites

Build

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

Test

You can run the tests using the following npm script:

yarn test

Or you can run the tests in watch mode:

yarn test:watch