https://github.com/vast-engineering/gulp-file-to-json
Gulp plugin to convert a file and its MD5 hash value into a JSON representation.
https://github.com/vast-engineering/gulp-file-to-json
Last synced: about 2 months ago
JSON representation
Gulp plugin to convert a file and its MD5 hash value into a JSON representation.
- Host: GitHub
- URL: https://github.com/vast-engineering/gulp-file-to-json
- Owner: vast-engineering
- License: mit
- Created: 2016-03-29T22:52:17.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-27T17:01:55.000Z (over 9 years ago)
- Last Synced: 2026-03-21T00:10:12.770Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-file-to-json
> Gulp plugin to convert a file and its MD5 hash value into a JSON representation.
[](https://www.npmjs.org/package/gulp-file-to-json) [](https://david-dm.org/vast-engineering/gulp-file-to-json) [](https://david-dm.org/vast-engineering/gulp-file-to-json?type=dev)
## Install
```bash
npm install --save-dev gulp-file-to-json
```
## Usage
Transform `example.css`:
```css
body {color: olive;}
```
Into `example.json`:
```json
{
"md5": "d8fba0d7a4fcb4a293d22ff3361d5a70",
"value": "body {color: olive;}"
}
```
Using `gulpfile.js`:
```javascript
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](https://github.com/CrocoDillon/font-store) (Base64 encodes web fonts to cache in LocalStorage for high performance).
## License
[MIT](https://github.com/vast-engineering/gulp-file-to-json/blob/master/LICENSE) © 2016 Vast.com, Inc.