- Fork this repo on Github and clone it locally
npm install
to grab dependenciesnpm run cleanbuild && npm run test
to build and 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.re
is where all of the decoders are definedDecode_As*.re
modules constructDecode_Base
with everything it needs to produce decoders for a specific output type (e.g.option
,result
)Decode_ParseError.re
defines the structured errors and helper functions to work withresult
values of that error type
bs-decode
currently has 100% test coverage, and we hope to keep it that way. :) Running npm run test
(or jest --coverage
) will run your 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.