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 init
will configure your environment... this only needs to be done oncemake install
will install bothnpm
andopam
dependenciesmake build
ormake watch
to build the project andmake test
to 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 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.