Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfinelli/gulp-bankrupt
Asset manifest generator for gulp (hashes and subresource integrity)
https://github.com/mfinelli/gulp-bankrupt
gulp-plugin nodejs
Last synced: 13 days ago
JSON representation
Asset manifest generator for gulp (hashes and subresource integrity)
- Host: GitHub
- URL: https://github.com/mfinelli/gulp-bankrupt
- Owner: mfinelli
- License: mit
- Created: 2017-04-29T16:10:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T00:53:54.000Z (over 7 years ago)
- Last Synced: 2024-12-03T05:37:34.079Z (about 1 month ago)
- Topics: gulp-plugin, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulp-bankrupt
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-bankrupt
[![Build Status](https://travis-ci.org/mfinelli/gulp-bankrupt.svg?branch=master)](https://travis-ci.org/mfinelli/gulp-bankrupt)
An asset manifest generator that includes hashes and subresource integrity.
## Usage
```javascript
const bankrupt = require('gulp-bankrupt'),
gulp = require('gulp');gulp.task('bankrupt', function() {
return gulp.src('./public/*.png').pipe(bankrupt()).pipe(gulp.dest('.'))
});
```When you run `gulp bankrupt` you should see a file in your `gulp.dest` named
`manifest.json` that has the hashes and sri values for every file in the
input.For example:
```json
{
"/home/mario/src/express-example/public/logo.png": {
"hash":"ef910cd40fefc2b1e641e84e95328425",
"sri":"sha384-YR9vHfDsFvr2xGF1PXPTa/UPKKZh/U8hYJc9kd+pr/dbNo/on9Ovt2QMKUsJwm9z"
},
"/home/mario/src/express-example/public/img1.png": {
"hash":"4018517e00fbc5a6516857fe1875e989",
"sri":"sha384-ixgi3CSwa9S3vguJmugaYNA30MCZXW3wSFoOk241yNS1zn9mZVaNoNniJbBUe3e4"
}
}
```