namshi/gulp-srizer

Name: gulp-srizer

Owner: Namshi

Description: Add SRI hashes to your assets

Created: 2015-09-28 13:12:14.0

Updated: 2015-12-28 10:19:28.0

Pushed: 2015-09-30 11:15:17.0

Homepage: null

Size: 196

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

gulpSrizer

Build Status

Easilly add the needed w3c Sri informations to your html and jade files.

Installation

Install this library via NPM:

install gulp-srizer --save
Usage
srizer = require('gulp-srizer');

.task('sri', function() {
return gulp.src('path/to/your/jade/or/html/files')
    .pipe(srizer())
    .pipe(gulp.dest('/where/should/we/write/them'));

Options:

example:

er({fileExt: 'css'});
r
er({fileExt: ['css', 'js']});

example:

er({path: '/path/to/your/resources'});

example:

er({algo: 'sha512'});

example:

er({prefix: false});
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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.