gulp-rev-sri
A gulp-rev subresource integrity plugin
Table of Contents
Install
npm:
npm install gulp-rev-sri
yarn:
yarn add gulp-rev-sri
Usage
const gulp = ;const rev = ;const revSri = ; gulp ; // sri-manifest.json// { <original_file>: { path: <file_with_rev_hash>, integrity: 'sha256-<hash_of_file>' } }
Options
base
- base file path for build filesmanifestName
(default:sri-manifest.json
) - name of the manifest file being created (Warning do not userev-manifest.json
)
Warning: The original rev-manifest.json
is in the format:
while the new sri format couples a file path with it's integrity hash in the new format of:
It's recommended that you choose a different file name from rev-manifest.json
due to potential complications in merging existing files.
Contributors
Name | Website |
---|---|
Shaun | https://shaunwarman.com |