Skip to content

Latest commit

History

History
42 lines (27 loc) 路 1.23 KB

CONTRIBUTING.md

File metadata and controls

42 lines (27 loc) 路 1.23 KB

Introduction

Thanks for taking the interest in making the ebnf2railroad tool even better!

Your First Contribution

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

Prerequisites

  • Node >= 11.0
  • Yarn >= 1.12.0
  • Watch (optional)

On mac, using homebrew: brew install node yarn watch

Getting started

  • Install dependencies: yarn install
  • Run tests with: yarn test
  • Check your syntax with: yarn lint
  • Update example files with: yarn update-examples
  • Generate new parser with: yarn build-parser (when you make changes in the ebnf.jison file)

The easiest development flow for browser related work is:

watch -n 1 'yarn build-parser; yarn update-examples'

This will continuously rebuild the parser and update the examples every second. and then use open examples/optimizations.html to check the file in your browser.

Just mutate the code, and reload the browser for effect.

The easiest way for technical implementations like optimalisations is:

yarn test --watch

This will automatically rerun the tests when files change.