Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jest-transform-nearley

adam1658827MIT2.0.0

Jest transform to support nearley grammars

jest, nearley, transform

readme

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:

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.0.0] - 2020-02-13

Changed

  • Fix importing other grammars. Makes nearley search for included files relative to current file, rather than to the cwd.

[1.0.0] - 2019-02-15

Added

Fixed

  • Corrected repository field in package.json

[0.1.0] - 2019-02-08

Added

  • Initial release