{"size": 704, "ext": "js", "max_stars_repo_path": "server/test/generateW2WebAPI.js", "max_stars_repo_name": "WarpWorks/HeadStart", "max_stars_repo_stars_event_min_datetime": "2017-12-01T08:26:47.000Z", "max_stars_repo_stars_event_max_datetime": "2018-01-30T10:29:03.000Z", "max_issues_repo_path": "server/test/generateW2WebAPI.js", "max_issues_repo_name": "WarpWorks/HeadStart", "max_issues_repo_issues_event_min_datetime": "2017-04-19T21:09:10.000Z", "max_issues_repo_issues_event_max_datetime": "2017-04-19T21:09:36.000Z", "max_forks_repo_path": "server/test/generateW2WebAPI.js", "max_forks_repo_name": "WarpWorks/HeadStart", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 37.0526315789, "max_line_length": 110, "alphanum_fraction": 0.7201704545}
const path = require('path');
console.log("Generating WarpWorks WebAPI:");
const warpCore = require('@warp-works/core');

const ROOT_DIR = path.dirname(require.resolve('./../../package.json'));


console.log("Reading SMN file...");
var smn = warpCore.readFile(require.resolve('@warp-works/core/mda/WarpWorks.smn'));
console.log("Creating WarpWorks model...");
var domain = warpCore.createModelElementsFromSMN(smn);
// console.log (domain.toString());
// console.log (JSON.stringify(domain.toJSON(), null, 2));

console.log("Applying template...");

// TBD - fix problem with target directory!
var t = warpCore.applyTemplateFile(path.join(ROOT_DIR, 'mda', 'templates', 'WarpWorks_WebAPI.hst'), [domain]);
