Noodles, Poodles and More!

    broccoli-pegjs-import

    0.0.2 • Public • Published

    broccoli-pegjs

    Forked from broccoli-pegjs.

    A PEG.js filter for Broccoli that uses pegjs-import.

    Installation

    npm install --save-dev broccoli-pegjs-import

    Usage

    var peg = require('pegjs-import');
    var pegBuilder = require('broccoli-pegjs-import');
    tree = pegBuilder(tree, {
      peg: peg
    });

    Options

    • wrapper - Wrap the generated parser in any code you want:
    tree = pegBuilder(tree, {
      wrapper: function (src, parser) {
        return 'var Parser = ' + parser + ";\nvar parse = Parser.parse, SyntaxError = Parser.SyntaxError;\nexport {SyntaxError, parse};\nexport default parse;";
      }
    });
    
    • peg - Provide an alternative peg instance.
    tree = pegBuilder(tree, {
      peg: require('pegjs-import')
    });
    

    Install

    npm i broccoli-pegjs-import

    DownloadsWeekly Downloads

    4,271

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • mixonic