{"size": 1503, "ext": "js", "max_stars_repo_path": "src/plop-new-codemod.js", "max_stars_repo_name": "dangreenisrael/create-codemod", "max_stars_repo_stars_event_min_datetime": "2019-09-21T02:01:51.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-01T09:35:12.000Z", "max_issues_repo_path": "src/plop-new-codemod.js", "max_issues_repo_name": "dangreenisrael/create-codemod", "max_issues_repo_issues_event_min_datetime": "2019-09-23T13:09:42.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-22T14:25:35.000Z", "max_forks_repo_path": "src/plop-new-codemod.js", "max_forks_repo_name": "dangreenisrael/create-codemod", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 8, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 33.4, "max_line_length": 85, "alphanum_fraction": 0.6001330672}
module.exports = function(plop) {
  const userAppRoot = process.env.PWD;
  // create your generators here
  plop.setGenerator('add-transform', {
    description: 'application controller logic',
    abortOnFail: true,
    actions: [
      {
        type: 'add',
        path: `${userAppRoot}/transforms/{{name}}.js`,
        templateFile: 'new-codemod-templates/transform.js',
      },
      {
        type: 'add',
        path: `${userAppRoot}/transforms/__tests__/{{name}}.js`,
        templateFile: 'new-codemod-templates/__tests__/transform-test.js.txt',
      },
      {
        type: 'add',
        path: `${userAppRoot}/transforms/__testfixtures__/{{name}}/case-1.input.js`,
        templateFile:
          'new-codemod-templates/__testfixtures__/transform-tests/case-1.input.js',
      },
      {
        type: 'add',
        path: `${userAppRoot}/transforms/__testfixtures__/{{name}}/case-1.output.js`,
        templateFile:
          'new-codemod-templates/__testfixtures__/transform-tests/case-1.output.js',
      },
      {
        type: 'add',
        path: `${userAppRoot}/transforms/__testfixtures__/{{name}}/case-2.input.js`,
        templateFile:
          'new-codemod-templates/__testfixtures__/transform-tests/case-2.input.js',
      },
      {
        type: 'add',
        path: `${userAppRoot}/transforms/__testfixtures__/{{name}}/case-2.output.js`,
        templateFile:
          'new-codemod-templates/__testfixtures__/transform-tests/case-2.output.js',
      },
    ],
  });
};
