Input html file(s) and get a stream of all referenced stylesheets which can then be usedfor further processing like concatenation, minification or for testing
Clone code from gulp-scripts-index
$ npm install --save-dev gulp-stylesheet-index
If you simply need all files that are referenced in the index.html and you don't want to use the excellent useref for further processing it is as simple as:
var gsi = require('gulp-stylesheet-index');
gulp.src(['index.html'])
.pipe(gsi())
.pipe(doSomethingElse())
.pipe(gulp.dest('./'))
searchPaths
{Array} - Defaults to[]
. this option can be used to specify additional locations in which to look for the script files referenced in index.html. That way, even files that are not stored at the actually specified location can be found and processed. The specified searchpaths are to be defined as relative to the process's cwd.
MIT © Artem Kolesnik