A jest transform that enables nearley grammar support
-
Install the transform:
npm install jest-transform-nearley
-
Configure jest:
{ "transform": { "^.+\\.ne$": "jest-transform-nearley" } }
-
Now you can import *.ne files from javascript:
const grammar = require('./grammar.ne');
Testing:
npm run test
Formatting with prettier:
npm run format
MIT License
Inspired by: