You'll need to already have Node.js, Opam, and make. These instructions also use yarn rather than npm for working with Node dependencies and scripts (npm install -g yarn).
- Fork this repo on Github and clone it locally
make initwill configure your environment... this only needs to be done oncemake installwill install bothnpmandopamdependenciesmake buildormake watchto build the project andmake testto run tests- Make your changes (and add appropriate tests)
- Open a pull request with your changes
We use Relude as our standard library, so try to avoid using Belt or Pervasives when working with lists, options, etc.
To make the code easier to understand for other new contributors, we've tried to minimize our use of infix functions. Using >> for forward composition is fine, though.
Also, please make sure that your code has been formatted with refmt.
Decode_Base.reis where all of the decoders are definedDecode_As*.remodules constructDecode_Basewith everything it needs to produce decoders for a specific output type (e.g.option,result)Decode_ParseError.redefines the structured errors and helper functions to work withresultvalues of that error type
bs-decode currently has 100% test coverage, and we hope to keep it that way. :) Running make test-coverage will run the tests and give you a coverage report. You can see the detailed report in ./coverage/lcov-report/index.html, which will help you track down any uncovered functions or branches.
The documentation website is currently generated with Docusaurus. For more information on contributing to, running, and publishing the website, see the README in the website folder.
Separately from the website, we maintain *.rei interface files that provide type hints and doc comments to editors. When adding new functionality, make sure you update the appropriate interface files with type signatures and comments.