Socket
Socket
Sign inDemoInstall

pegjs-brunch

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pegjs-brunch

A generic PEG.js plugin for Brunch


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

pegjs-brunch

Copyright 2017, Caleb Evans
Released under the MIT License

Build Status

This plugin adds PEG.js support to Brunch.

Usage

1. Install the package

In your project directory, run:

npm install --save-dev pegjs-brunch

2. Set plugin options

In brunch-config.js, you can specify any options which should be passed to the parser generator. See the PEG.js API reference for a list of available options.

module.exports = {
  // ...
  plugins: {
    pegjs: {
      cache: true,
      format: 'commonjs'
    }
  }
  // ...
};

3. Watch grammar files

Because the plugin will generate JavaScript files from any *.pegjs grammar files, you must tell Brunch to watch *.pegjs files.

In brunch-config.js, add a *.pegjs pattern somewhere in the javascripts.joinTo map.

module.exports = {
  // ...
  javascripts: {
    joinTo: {
      'main.js': ['app/scripts/*.pegjs', 'app/scripts/*.js', /^node_modules/]
    }
  }
  // ...
};

Keywords

FAQs

Last updated on 01 Feb 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc