gulp-jsont
v1.1.1
Published
JSON transformation plugin for gulp
Downloads
8
Readme
gulp-jsont
JSON transformation plugin for Gulp based on JSONT by Stefan Goessner.
Usage
var jsont = require('gulp-jsont');
gulp.task('jsont', function() {
gulp.src('example.json')
.pipe(jsont('template.json'))
.pipe(gulp.dest('./build/'));
});
example.json
{
"link": {
"uri": "http://company.com",
"title":"company homepage"
}
}
template.json
{
"link": "<a href=\"{link.uri}\">{link.title}</a>"
}
Results
<a href="http://company.com">company homepage</a>
More information
Here is the documentation got JSONT library: http://goessner.net/articles/jsont/