Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cameronhunter/rollup-plugin-pegjs
Import PEG.js grammars as parsers directly in your code
https://github.com/cameronhunter/rollup-plugin-pegjs
Last synced: about 2 months ago
JSON representation
Import PEG.js grammars as parsers directly in your code
- Host: GitHub
- URL: https://github.com/cameronhunter/rollup-plugin-pegjs
- Owner: cameronhunter
- License: mit
- Created: 2016-01-17T21:55:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T08:41:32.000Z (over 7 years ago)
- Last Synced: 2024-10-12T07:16:07.804Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 7
- Watchers: 3
- Forks: 5
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome - pegjs - Import PEG.js grammars as parsers. (Plugins / Transpilation)
README
# rollup-plugin-pegjs
[![Build Status](https://travis-ci.org/cameronhunter/rollup-plugin-pegjs.svg?branch=master)](https://travis-ci.org/cameronhunter/rollup-plugin-pegjs) [![NPM Version](https://img.shields.io/npm/v/rollup-plugin-pegjs.svg)](https://npmjs.org/package/rollup-plugin-pegjs) [![License](https://img.shields.io/npm/l/rollup-plugin-pegjs.svg)](https://github.com/cameronhunter/rollup-plugin-pegjs/blob/master/LICENSE.md)
A [rollup](http://rollupjs.org) plugin allowing you to import [PEG.js](http://pegjs.org) grammars as parsers directly in your code.
```js
import { parse } from "grammar.pegjs";
console.log(parse("language to parse"));
```## Install
```sh
npm install --save-dev rollup-plugin-pegjs
```## Usage
```js
import { rollup } from "rollup";
import pegjs from "rollup-plugin-pegjs";rollup({
entry: "main.js",
plugins: [
pegjs()
]
});
```