Skip to content

Latest commit

 

History

History
executable file
·
52 lines (35 loc) · 711 Bytes

README.md

File metadata and controls

executable file
·
52 lines (35 loc) · 711 Bytes

jest-transform-nearley

A jest transform that enables nearley grammar support

Usage

  1. Install the transform:

    npm install jest-transform-nearley
  2. Configure jest:

    {
      "transform": {
        "^.+\\.ne$": "jest-transform-nearley"
      }
    }
  3. Now you can import *.ne files from javascript:

    const grammar = require('./grammar.ne');

Development

Testing:

npm run test

Formatting with prettier:

npm run format

License

MIT License

Acknowledgements

Inspired by: