gulp-lex-parser

1.0.0 • Public • Published

gulp-lex-parser

Lex-parser plugin for gulp

Installation

You can install gulp-lex-parser via npm install:

npm install gulp-lex-parser

Example

var gulp = require('gulp');
var lexParser = require('gulp-lex-parser');

gulp.task('lex', function () {
    return gulp.src('src/grammar.jisonlex')
        .pipe(lexParser())
        .pipe(gulp.dest('dist'));
});

Usage

lexParser([options])

gulp-lex-parser currently supports the options below:

  • String outFile: Output file path (Default: <input_file_name>.json)

Template

gulp-lex-parser supports templates (see gutil.template). Currently supported variables:

Example
var gulp = require('gulp');
var lexParser = require('gulp-lex-parser');

gulp.task('lex', function () {
    return gulp.src('src/grammar.jisonlex')
        .pipe(lexParser({
            outFile: '<%= path.basename %>.json', // Will produce 'grammar.json
        }))
        .pipe(gulp.dest('dist'));
});

License

See LICENSE.

/gulp-lex-parser/

    Package Sidebar

    Install

    npm i gulp-lex-parser

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • danilo-valente