Skip to content

adam1658/jest-transform-nearley

Repository files navigation

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:

About

Jest transform for nearley grammars

Resources

License

Stars

Watchers

Forks

Packages

No packages published