Skip to content

Gulp plugin to convert a file and its MD5 hash value into a JSON representation.

License

Notifications You must be signed in to change notification settings

vast-engineering/gulp-file-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-file-to-json

Gulp plugin to convert a file and its MD5 hash value into a JSON representation.

NPM version Dependency Status devDependency Status

Install

npm install --save-dev gulp-file-to-json

Usage

Transform example.css:

body {color: olive;}

Into example.json:

{
  "md5": "d8fba0d7a4fcb4a293d22ff3361d5a70",
  "value": "body {color: olive;}"
}

Using gulpfile.js:

var gulp = require('gulp');
var file2json = require('gulp-file-to-json');

gulp.task('json-file', function () {
  return gulp.src('example/example.css')
    .pipe(file2json())
    .pipe(gulp.dest('example'));
});

Credits

Inspired by font-store (Base64 encodes web fonts to cache in LocalStorage for high performance).

License

MIT © 2016 Vast.com, Inc.

About

Gulp plugin to convert a file and its MD5 hash value into a JSON representation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published