{"library":"plop-prettier","title":"plop-prettier","description":"Plop action type that runs Prettier on files added via plop's add action. Version 3.0.0 requires plop 3.x and Prettier 1.17+. Released intermittently. Differentiator: integrates Prettier formatting directly into plop generators via 'pretty-add' action, reducing boilerplate.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install plop-prettier"],"cli":null},"imports":["plop.load('plop-prettier')","type: 'pretty-add'","plop.load('plop-prettier', { tabWidth: 4 })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// plopfile.js\nmodule.exports = function (plop) {\n  plop.load('plop-prettier', { tabWidth: 4 });\n\n  plop.setGenerator('component', {\n    description: 'Create a new component',\n    prompts: [\n      {\n        type: 'input',\n        name: 'name',\n        message: 'Component name'\n      }\n    ],\n    actions: [\n      {\n        type: 'pretty-add',\n        path: 'src/{{pascalCase name}}/{{pascalCase name}}.js',\n        template: `import React from 'react';\n\nconst {{pascalCase name}} = () => {\n  return <div>{{pascalCase name}}</div>;\n};\n\nexport default {{pascalCase name}};`\n      }\n    ]\n  });\n};","lang":"javascript","description":"Example plopfile loading plop-prettier and using 'pretty-add' action type to create a component file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}