ast-stream
v0.0.16
Published
Abstract Syntax Tree as a Stream
Downloads
10
Maintainers
Readme
ast-stream
Abstract Syntax Tree as a stream
example:
var map = require('map-stream');
var vfs = require('vinyl-fs');
var toAst = require('ast-stream')();
var astSrc = vfs.src(['./src/utils/*.js'])
.pipe(toAst)
.pipe(map(function (file, cb) {
var ast = file.ast;
// do something with ast, e.g. transform it
console.log(ast);
cb(null, file);
}));