Jest transform for nearley grammars
Branch: master
Clone or download
Latest commit a131b88 Feb 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ Initial commit Feb 8, 2019
.gitignore Initial commit Feb 8, 2019
CHANGELOG.md 1.0.0 Feb 15, 2019
LICENSE
README.md Update README Feb 8, 2019
index.js Initial commit Feb 8, 2019
jest.config.js Initial commit Feb 8, 2019
package-lock.json Initial commit Feb 8, 2019
package.json 1.0.0 Feb 15, 2019
prettier.config.js Initial commit Feb 8, 2019

README.md

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: