Skip to content

lazdmx/gulp-peg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.