0.0.16 • Published 8 years ago

ast-stream v0.0.16

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

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);
        }));