1.0.3 • Published 11 years ago
web-component-parser v1.0.3
web-component-parser
Parses html for web component references and creates a dependency json
Install
npm install web-component-parser --saveUsage
var wcp = require('wcp');
wcp.dependencies({
fileName: 'deps',
src: './test/fixtures/*.html',
dest: './test/'
};dependencies(options)
You can call the dependencies api directly, this will return a vinyl-fs stream object allowing
it to be piped.
options{Object}src{Array|String} source directory forhtmlfiles to parsedest{String} destination directory to add json filefileName{String} file name of json file that will be created. Defaults todependencies.json
gulp
web-component-parser can be used directly with gulp.
var gulp = require('gulp'),
wcp = require('wcp');
gulp.task( 'deps', function(){
return gulp.src('./test/fixtures/*.html')
.pipe( wcp({
fileName: 'fileName'
}) )
.pipe( gulp.dest('./test/') );
});licence
MIT