{"size": 1427, "ext": "js", "max_stars_repo_path": "example/index.js", "max_stars_repo_name": "ulivz/readmi", "max_stars_repo_stars_event_min_datetime": "2017-09-17T16:11:20.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-17T16:11:20.000Z", "max_issues_repo_path": "example/index.js", "max_issues_repo_name": "ulivz/readmi", "max_issues_repo_issues_event_min_datetime": "2019-07-30T16:50:26.000Z", "max_issues_repo_issues_event_max_datetime": "2019-07-30T16:50:28.000Z", "max_forks_repo_path": "example/index.js", "max_forks_repo_name": "ulivz/akai", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 25.0350877193, "max_line_length": 290, "alphanum_fraction": 0.6103714085}
const fs = require('fs')
const readmi = require('../')

const context = {
  usage: true,
  author: 'ULIVZ',
  username: 'ulivz',
  name: 'plain-template',
  website: 'http://www.v2js.com',
  logo: {
    img: 'https://cdn.rawgit.com/ulivz/v-codemirror/master/media/logo.svg',
    width: 300,
    description: "How's it different from a boilerplate?"
  },
  badges: {
    version: true,
    downloads: true,
    codecov: true,
    ci: true,
    coverage: true
  },
  install: {
    newname: 'Install it',
    yarn: true,
    npm: true
  },
  faq: {
    newname: 'Q & A',
    qaList: [
      {
        q: "How's it different from a boilerplate?",
        a: `It's hard to upgrade your project if you're using a boilerplate since you might change the code to suit your needs. However you can easily upgrade your project to use latest version of Poi by simply updating the dependency. You can also get rid of boilerplate code in this way.`
      }
    ],
  },
  using: {
    newname: 'Projects Using Docute',
    usingList: [
      {
        name: 'codepan',
        username: 'egoist',
        description: 'Like codepen and jsbin but works offline.'
      },
    ]
  },
  customizeColums: [
    {
      title: 'Who is using Poi?',
      content: 'usings'
    }
  ]
}

const readmeTmpl = fs.readFileSync(path.resolve(__dirname, 'template/README.md'), 'utf-8')

fs.writeFileSync('./README.md', readmi(readmeTmpl, context), 'utf-8')
