{"size": 582, "ext": "js", "max_stars_repo_path": "node_modules/bundle-deps/bundle-deps.js", "max_stars_repo_name": "bgantelm/trainReact", "max_stars_repo_stars_event_min_datetime": "2015-01-14T17:01:00.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-07T12:55:55.000Z", "max_issues_repo_path": "node_modules/bundle-deps/bundle-deps.js", "max_issues_repo_name": "bgantelm/trainReact", "max_issues_repo_issues_event_min_datetime": "2016-01-04T14:14:20.000Z", "max_issues_repo_issues_event_max_datetime": "2016-01-04T14:14:20.000Z", "max_forks_repo_path": "node_modules/bundle-deps/bundle-deps.js", "max_forks_repo_name": "bgantelm/trainReact", "max_forks_repo_forks_event_min_datetime": "2015-04-20T05:04:29.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-02T23:59:54.000Z"}
{"max_stars_count": 34, "max_issues_count": 1, "max_forks_count": 6, "avg_line_length": 25.3043478261, "max_line_length": 79, "alphanum_fraction": 0.6494845361}
#!/usr/bin/env node

var p = ''
  , writeFile = require('fs').writeFile
  , resolve = require('path').resolve

if (process.argv[2]) {
  p = process.argv[2];
}
p = p.replace(/\/?package\.json$/, '');
p || (p = '.');
p += '/package.json';
p = resolve(p);

var data = require(p);
delete data.bundleDependencies;
delete data.bundledDependencies;
data.bundledDependencies = Object.keys(data.dependencies || {});

writeFile(p, JSON.stringify(data, null, 2), 'utf8', function (err) {
  if (err) throw err;
  console.log('bundled ' + data.bundledDependencies.length + ' dependencies.');
});