gulpSrizer
Easilly add the needed w3c Sri informations to your html and jade files.
Installation
Install this library via NPM:
npm install gulp-srizer --save
Usage
var srizer = ; gulp;
Options:
- fileExt: resource's extension we want to add SRIs for (default: css, js)
example:
;// or;
- path: where should we look for resource files. By default this path is inferred by the location of your html/jade files
example:
;
- algo: which hashing algorithm should be used (default: sha256)
example:
;
- prefix: where should we prepend of not the algorithm to the has or not (default: true)
example:
;
Tip and tricks:
If you're using gulp-cdnizer or gulp-rev-all in your project, we suggest your sri
task to be the last one.
Tests
Have mocha installed and: npm test