0.1.0 • Published 10 years ago
gulp-esprima v0.1.0
gulp-esprima
Usage:
var gulp = require('gulp'),
esprima = require('gulp-esprima');
// This task will parse all of the JavaScript files under lib/
// and save JSON representations of their ASTs (abstract syntax
// trees) under parsed/
gulp.task('parse', function() {
return gulp.src('lib/**/*.js')
.pipe(esprima()) // or esprima({ [options] })
.pipe(gulp.dest('parsed/'));
});
This plugin accepts two options:
pretty
: for nicely indented JSON (default:false
)esprima
: options to pass directly toesprima.parse
0.1.0
10 years ago