{"_id":"@adeattwood/plop-files","name":"@adeattwood/plop-files","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@adeattwood/plop-files","version":"0.0.1","main":"index.js","license":"MIT","public":true,"description":"<div align=\"center\">","_id":"@adeattwood/plop-files@0.0.1","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-YLCM8PVOl5P8kpA4wLzbcaqD/CmEPNnchxuBqcwiny48mIInqffdQb5DWmBQUU4ytleCLw/7Y9nIhhdL3dNwQw==","shasum":"14bf48fe33d6998d53ea8e5769359a8980fd0696","tarball":"https://registry.npmjs.org/@adeattwood/plop-files/-/plop-files-0.0.1.tgz","fileCount":20,"unpackedSize":15235,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnvvAhwwMfRpNgdZyviMakaR0PHJd+qd6tBai9mXQN4AiATAJs2DbQQmM4f9BbKX7h60ZXPrSFSzYjG2KqJOE25DA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiJsiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrqlg/+L7h43p4jBNOy8Iw8CzV+U8vGSL8uJ02703KS4U4XcCyhR8o+\r\nD83k0jSdrO1Dit/8GaT5Ws8LBlhE9XDDi9ZTumnK4vT4eWZPq8OL0QzzBQkM\r\nkBhazbqXipog9j6GiAD/pDs4E2Ghf3Jmioto/U6YV6+FiSjT9tvTyQZGSoxh\r\nqR2FY2Ua8QkIUqbyx4Q8uHsArau9gR8qEwa4uC5tnAznQTtQFnhTh760FUHL\r\nofKk6zNrnWu4eSp3nsfgZMLFAxa8zVlbOlt4OIp6IeM9mMkthyOnh2JSk0bv\r\n05hiEbGnPHttu1vD9P6RI15NGREUz/p1VatCIITlXdOLpz1znREp1yVzbf34\r\nRgx3vzZYYx55CkTLA9fvL3pnjj5YaVRVGebgLc+mlECP2hreUqIlS5c0JI75\r\nJ1UHvwkxR80gDGInLwTq4zQigR38oDfgLNbinVWI2jySJJOvdcnwCa0laaKq\r\nJhigTR4CIZUIdyNmj9KLdNhLAKaEGxLW2a2v85CSr8iHmh38JG8kca1yJLsL\r\nVKM5h1Eolnv4y/W0euE1GBwmME1ya/O8iLJXuhEGVdFsBcD2/YXdiGr/00zS\r\nDxOeq0SWklNta2Cqd/xkpD5Ni+GGtezZ0uAj8Nt4T+Q1qNd9fLmPcxxKVHbp\r\numuqdyUxooPh3Qy/1AJByQlcRRdNCrJbto0=\r\n=gYWC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ade-attwood","email":"hello@adeattwood.co.uk"},"directories":{},"maintainers":[{"name":"ade-attwood","email":"hello@adeattwood.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plop-files_0.0.1_1653119778397_0.8189322226128433"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-21T07:56:18.329Z","0.0.1":"2022-05-21T07:56:18.549Z","modified":"2022-05-21T07:56:18.704Z"},"maintainers":[{"name":"ade-attwood","email":"hello@adeattwood.co.uk"}],"description":"<div align=\"center\">","license":"MIT","readme":"<div align=\"center\">\n\n# Plop Files\n\n[Plop](https://plopjs.com/) templates for javascript, typescript and react.\n\n</div>\n\nPlop is a CLI tool for generating code from templates for a faster development\nworkflow. This project is a common set up templates so I can keep things\nconsistent and speed up development when I am woking on personal projects.\n\n## Basic usage\n\nThis is an example for a basic `plopfile.js` in the root of your project\n\n```js\nconst reactComponent = require(\"@adeattwood/plop-files/react-component-ts\");\nconst reactDir = \"./src\";\n\nmodule.exports = function main(plop) {\n  reactComponent(plop, { componentsDir: `./${reactDir}/components` });\n};\n```\n\n## Templates\n\nA list of all the templates available along with all the files created and options\nyou can use to customise the templates\n\n### React typescript component\n\nA react component in typescript with a test and scss module for styling\n\n#### Files created\n\n- `/{{group}}/{{name}}.tsx`\n- `/{{group}}/{{name}}.test.tsx`\n- `/{{group}}/{{name}}.module.scss`\n\n#### Options\n\n| Option          | Description                                               |\n| --------------- | --------------------------------------------------------- |\n| `componentsDir` | The directory where all of your component will be created |\n\n### React javascript component\n\nA react component in javascript with a test and scss module for styling\n\n#### Files created\n\n- `/{{group}}/{{name}}.{js,jsx}`\n- `/{{group}}/{{name}}.test.{js,jsx}`\n- `/{{group}}/{{name}}.module.scss`\n\n#### Options\n\n| Option          | Description                                                                        |\n| --------------- | ---------------------------------------------------------------------------------- |\n| `componentsDir` | The directory where all of your component will be created                          |\n| `fileExtension` | The file extension that will be used in the javascript files. The default is `jsx` |\n\n### React typescript context\n\nA react context file in typescript\n\n#### Files created\n\n- `/{{name}}.tsx`\n\n#### Options\n\n| Option       | Description                                              |\n| ------------ | -------------------------------------------------------- |\n| `contextDir` | The directory where all of your contexts will be created |\n\n### React javascript context\n\nA react context file in javascript\n\n#### Files created\n\n- `/{{name}}.{js,jsx}`\n\n#### Options\n\n| Option          | Description                                                                        |\n| --------------- | ---------------------------------------------------------------------------------- |\n| `contextDir`    | The directory where all of your contexts will be created                           |\n| `fileExtension` | The file extension that will be used in the javascript files. The default is `jsx` |\n\n### React javascript hook\n\nA react hook file in javascript\n\n#### Files created\n\n- `/use-{{name}}.js`\n\n#### Options\n\n| Option     | Description                                           |\n| ---------- | ----------------------------------------------------- |\n| `hooksDir` | The directory where all of your hooks will be created |\n\n### React typescript hook\n\nA react hook file in typescript\n\n#### Files created\n\n- `/use-{{name}}.ts`\n\n#### Options\n\n| Option     | Description                                           |\n| ---------- | ----------------------------------------------------- |\n| `hooksDir` | The directory where all of your hooks will be created |\n\n### Next JS Page\n\nA Next JS page in typescript with test files and scss module styles file. This creates pages with a `.pages.ts` extension and requests the `pageExtensions` prop to be changed in the `next.config.js` so you can keep pages files and test files together.\n\n```js\n...\npageExtensions: ['page.tsx', 'page.ts'],\n...\n```\n\n#### Files created\n\n- `/{{path}}/{{name}}.page.tsx`\n- `/{{path}}/{{name}}.test.tsx`\n- `/{{path}}/{{name}}.module.scss`\n\n#### Options\n\n| Option     | Description                                           |\n| ---------- | ----------------------------------------------------- |\n| `pagesDir` | The directory where all of your pages will be created |\n","readmeFilename":"README.md"}