{"size": 753, "ext": "js", "max_stars_repo_path": "src/tasks/issue_template.js", "max_stars_repo_name": "hiroppy/webpack-defaults", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/tasks/issue_template.js", "max_issues_repo_name": "hiroppy/webpack-defaults", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/tasks/issue_template.js", "max_forks_repo_name": "hiroppy/webpack-defaults", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.8181818182, "max_line_length": 61, "alphanum_fraction": 0.6294820717}
const path = require('path');

const { copyFiles, json, template } = require('mrm-core');

module.exports = () => {
  const pkg = json('package.json');

  const staticTemplates = [
    '.github/ISSUE_TEMPLATE/DOCS.md',
    '.github/ISSUE_TEMPLATE/SUPPORT.md',
  ];

  const dynamicTemplates = [
    'ISSUE_TEMPLATE.md',
    'ISSUE_TEMPLATE/BUG.md',
    'ISSUE_TEMPLATE/FEATURE.md',
    'ISSUE_TEMPLATE/MODIFICATION.md',
  ];

  const sourceDir = path.join(__dirname, '../../templates');

  copyFiles(sourceDir, staticTemplates);

  for (const tmpl of dynamicTemplates) {
    const file = template(
      `.github/${tmpl}`,
      path.join(__dirname, `../../templates/.github/${tmpl}`)
    );

    file.apply({ package: pkg.get('name') }).save();
  }
};
