gulp-jsont

1.1.1 • Public • Published

gulp-jsont

NPM Version NPM Downloads NPM License

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/

Readme

Keywords

Package Sidebar

Install

npm i gulp-jsont

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • chermenin