gulp-peg

Gulp plugin for compiling PEG grammars

MIT 4 个版本
安装
npm install gulp-peg
yarn add gulp-peg
pnpm add gulp-peg
bun add gulp-peg
README

gulp-peg

Build Status

Gulp plugin for PEG parsers compilation.

Detailed documentation will be writen soon...

Installation

Install plugin

npm install gulp-peg --save-dev

Add peg-compilation task into your gulp-file:

paths =
  build: "build"
  scripts: peg: "src/**/*.peg"

gulp.task "peg:compile", ->
  gulp
    .src( paths.scripts.peg )
    .pipe( peg( ).on( "error", gutil.log ) )
    .pipe( gulp.dest( paths.build ) )

Finish

Options

Plugin redirects passed options directly to PEG, so read its documentation for details.

exportVar option

This option is inspired by grunt-peg plugin, and defines variable to which the generated parser will be assigned in the output file. Default value is module.exports.

版本列表
0.2.0 2015-11-17
0.1.2 2014-06-20
0.1.1 2014-05-05
0.1.0 2014-05-05