{"size": 784, "ext": "js", "max_stars_repo_path": "lib/transform.js", "max_stars_repo_name": "atomizejs/atomize-client", "max_stars_repo_stars_event_min_datetime": "2015-02-16T22:38:40.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-12T19:49:26.000Z", "max_issues_repo_path": "lib/transform.js", "max_issues_repo_name": "briancavalier/atomize-client", "max_issues_repo_issues_event_min_datetime": "2018-01-15T10:43:24.000Z", "max_issues_repo_issues_event_max_datetime": "2018-01-15T10:43:24.000Z", "max_forks_repo_path": "lib/transform.js", "max_forks_repo_name": "briancavalier/atomize-client", "max_forks_repo_forks_event_min_datetime": "2015-01-25T16:16:45.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-24T06:50:27.000Z"}
{"max_stars_count": 15, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 25.2903225806, "max_line_length": 91, "alphanum_fraction": 0.5816326531}
#!/usr/bin/env node

/*global process, require */
/*jslint devel: true */

var walker = require('./walker');
var fs = require('fs');
var input = process.argv[2];
var output = process.argv[3];
var atomize = process.argv[4];
var ignore = process.argv.slice(5);

var dataReady = function (err, data) {
    var ast, pi, pp, result;
    if (err) {
        throw err;
    }
    try {
        ast = walker.parse(data);
        pi = new walker.ProxyInjector(ast, atomize, ignore);
        pi.transform();
        pp = new walker.PrettyPrinter(pi.ast);
        result = pp.print();
        fs.writeFileSync(output, result, 'utf8');
    } catch (err) {
        console.log(err.name + ":\n" + err.message + " at " + err.line + "," + err.column);
    }
};

fs.readFile(input, 'utf8', dataReady);
