New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@peeriq/ember-cli-pegjs

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peeriq/ember-cli-pegjs

Use this module to preprocess any .pegjs grammar to generate parsers.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

ember-cli-pegjs

An ember-cli addon for generating PegJS parser from grammar file.

Installation

npm install --save-dev @peeriq/ember-cli-pegjs

Usage

By default this addon will generate a parser for every file with the pegjs extension, the generated parser extension is js and will be located in the same folder as the grammar file.

The parser is exported as an ES6 module and can be simply imported as any other Ember CLI file.

You can control how the parser code is exported by specifying options using the pegOptions config property:

var app = new EmberApp({
  ...
  pegOptions: {
    wrapper: function (src, parser) {
      return 'var Parser = ' + parser + ";\nvar parse = Parser.parse, SyntaxError = Parser.SyntaxError;\nexport {SyntaxError, parse};\nexport default parse;";
    }
  }
});

Keywords

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc