{"size": 293, "ext": "js", "max_stars_repo_path": "lib/modules/scaffold/write.js", "max_stars_repo_name": "ynnjs/ynn-cli", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/modules/scaffold/write.js", "max_issues_repo_name": "ynnjs/ynn-cli", "max_issues_repo_issues_event_min_datetime": "2018-11-21T08:47:52.000Z", "max_issues_repo_issues_event_max_datetime": "2018-11-21T08:47:52.000Z", "max_forks_repo_path": "lib/modules/scaffold/write.js", "max_forks_repo_name": "ynnjs/ynn-cli", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 29.3, "max_line_length": 70, "alphanum_fraction": 0.6450511945}
const fs = require( 'fs' );
const nunjucks = require( 'nunjucks' );

nunjucks.configure( { autoescape : false } );

module.exports = ( tpl, dest, data = {} ) => {
    const template = fs.readFileSync( tpl ).toString();
    fs.writeFileSync( dest, nunjucks.renderString( template, data ) );
};
