{"size": 691, "ext": "js", "max_stars_repo_path": "bin/wordcop.js", "max_stars_repo_name": "heavenshell/wordcop", "max_stars_repo_stars_event_min_datetime": "2020-03-04T12:46:45.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-04T12:58:22.000Z", "max_issues_repo_path": "bin/wordcop.js", "max_issues_repo_name": "heavenshell/wordcop", "max_issues_repo_issues_event_min_datetime": "2020-03-04T13:01:26.000Z", "max_issues_repo_issues_event_max_datetime": "2020-03-20T15:15:27.000Z", "max_forks_repo_path": "bin/wordcop.js", "max_forks_repo_name": "heavenshell/wordcop", "max_forks_repo_forks_event_min_datetime": "2020-03-04T15:09:09.000Z", "max_forks_repo_forks_event_max_datetime": "2020-03-04T15:09:09.000Z"}
{"max_stars_count": 3, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 19.7428571429, "max_line_length": 51, "alphanum_fraction": 0.6049204052}
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const path = require('path')
const program = require('commander')

program
  .version('0.0.1', '-v, --version')
  .option(
    '-c, --config  [path]',
    'Path to configuration file.'
  )
  .option(
    '-t, --targetDir [path]',
    'Path to target directory.'
  )
  .parse(process.argv)

let config
try {
  const configFileName =
    program.config || 'wordcop.config.js'
  config = {
    ...require('../dist/config').createConfig(),
    ...require(path.resolve(configFileName))
  }
} catch {
  config = require('../dist/config').createConfig()
} finally {
  require('../dist').run({
    build: program.build,
    ...config
  })
}
