Create a readable stream that emits Modernizr code
const modernizrStream = require('modernizr-stream');
modernizrStream().pipe(process.stdout);
/*!
* modernizr v3.6.0
* Build https://modernizr.com/download?--dontmin
...
*/
npm install modernizr-stream
const modernizrStream = require('modernizr-stream');
options: Object
Return: stream.Readable
It returns a readable stream that emits JavaScript code built with the Modernizr code generator.
All options of modernizr.build
and stream.Readable
are available.
modernizrStream().on('data', data => {
data.length; //=> 5497
});
modernizrStream({minify: true}).on('data', data => {
data.length; //=> 1165
});
ISC License © 2018 - 2019 Shinnosuke Watanabe