Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.68 KB

CONTRIBUTING.md

File metadata and controls

55 lines (34 loc) · 1.68 KB

Contributing

Contributions to this repository are welcome.

I appreciate feedback of any kind via GitHub issues:

  • bug reports
  • feature suggestions
  • examples of web pages where percollate could do a better job

You can contribute to the code via pull requests. For small, straightforward fixes, you can create a PR directly. For more sophisticated changes, please open an issue beforehand to make sure we're on the same page.

Common tasks

Set up the project locally

Clone the repository to your local computer:

git clone git@github.com:danburzo/percollate.git
cd percollate

Then install the necessary dependencies:

npm install

You can then run the CLI by using ./cli.js instead of percollate:

./cli.js pdf --output some.pdf http://example.com

💡 You may need to add execution permissions to the file using chmod +x ./cli.js

Check that an EPUB is valid

We use the excellent epubcheck Java tool to validate EPUBs generated by percollate.

npx epubcheck ./book.epub

Debug the temporary HTML

If the generated PDF doesn't look like you'd expect, use the --debug flag to save to the disk the temporary HTML file that percollate generates. Open the HTML in your browser to inspect the markup and styles.

Run the code checks

Code is formatted automatically by Prettier on each commit. Additionally:

  • npm run lint runs eslint on the codebase to enforce more aspects of coding style;
  • npm run test runs the automated tests to ensure things work as expected.