{"_id":"@altafonte/create-stencil-component","_rev":"4-3483d740f5e36f40e614172e408ad629","name":"@altafonte/create-stencil-component","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@altafonte/create-stencil-component","version":"1.0.0","description":"Util to create the required files to add a new component to Altafonte Backoffice's frontend.","types":"dist/index.d.ts","main":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Altafonte/create-stencil-component.git"},"keywords":[],"author":{"name":"Adrián Gonzalo"},"license":"MIT","bugs":{"url":"https://github.com/Altafonte/create-stencil-component/issues"},"homepage":"https://github.com/Altafonte/create-stencil-component#readme","devDependencies":{"@types/node":"^14.14.6","typescript":"^4.0.5"},"gitHead":"b54cafe3f89a4ee5c2172768d2103a37046f457c","_id":"@altafonte/create-stencil-component@1.0.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-l5xyiMMoDKSyffKZvSRQ5w5BXJwaVOsRjS9gXljizqJJnMJpErs31q7qqYLV/RXjWUYt2noYjN19wAUEKP4z/A==","shasum":"dcc69bd74eca934bfc779f271c72fe8b593b3803","tarball":"https://registry.npmjs.org/@altafonte/create-stencil-component/-/create-stencil-component-1.0.0.tgz","fileCount":6,"unpackedSize":12119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpQ9DCRA9TVsSAnZWagAAwq8QAIp7ocWykaeKMysAt0t/\nJtwNYsnIRNt3u/XMfyVJA/PnHoT4hcKZRKlyFgeapyTmnEz80vcoYjjPZuny\nLzxLb53q9dzM/UPaI3wU0/POEoTQDi+K4QLvFwzZ8U/+rBWNOFico0tCnCYc\nYreOny37oCvw7f6trOIbh+milF5bHjKS2jPiPNFWW2S2dKkKK16FBZq9Ikui\nrlF/QvStP7cWJVV5tqkfMf6nHxNeN7O7xVXtX9UjcDod1HhPIcfjK2AzEdZ0\n66UaYGzJ/si/y7jVNCIG6X8FVDrhiVoedXCyTaj1bqr1sKj9TCf4XXou3cG/\n7wVOcJ+r7YThhF8nYYGgNU/R9pmJ33EsLMmWNYvuylXPdpVrba17ve8qapNw\naPNmd2YOQme9ZH2xkmO4UrHkzyM5ai2KqzhDOpvFWK8JiUDIQ/wPfMtrvHij\nmi4Gca0DkuvpPTHEn9MwqRbIMJUB3NmObxhVYuLu2eRGKJJ/Nwedhtn3L74f\n2IpCiZpqt92iA3kfLdMga/quICtgABgGxRqr13NtSceodzM3fs2qT6FpyNsP\neJWE969KyVl8d8LEb56PAgIaUxJmZHjvdtefsccCmdvaFUQ6OVgCCkK0pios\nbVpCTy+A9LZY9DoT1UdeUtidC5Y0Vsm3qKB4lIs70bn9dj/vwoVhfcItUjG0\nLv76\r\n=gZe8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxFolZDT0dQbeAKt9Fgd/tGFCkUj/Py37b6w322qlYOwIhAIDFkU7ED8XE2sxTIoLtMkevfFybEJ3wkBHIr3+inwU8"}]},"_npmUser":{"name":"agm-dev","email":"adrian.registros@gmail.com"},"directories":{},"maintainers":[{"name":"agm-dev","email":"adrian.registros@gmail.com"},{"name":"adrm","email":"adrian@adrm.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-stencil-component_1.0.0_1604652866995_0.232667947166868"},"_hasShrinkwrap":false},"1.1.0":{"name":"@altafonte/create-stencil-component","version":"1.1.0","description":"Util to create the required files to add a new component to Altafonte Backoffice's frontend.","types":"dist/index.d.ts","main":"dist/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/Altafonte/create-stencil-component.git"},"keywords":[],"author":{"name":"Adrián Gonzalo"},"license":"MIT","bugs":{"url":"https://github.com/Altafonte/create-stencil-component/issues"},"homepage":"https://github.com/Altafonte/create-stencil-component#readme","devDependencies":{"@types/node":"^14.14.6","typescript":"^4.0.5"},"gitHead":"a644655d75ed9948c3bb60fea918e989c5ab1640","_id":"@altafonte/create-stencil-component@1.1.0","_nodeVersion":"15.12.0","_npmVersion":"7.6.3","dist":{"integrity":"sha512-3BQIO0MQFns5T6/5hEEw8AUxZOHykNEHdGCMUg71acc92Pd2zNaY7X7oKePVT+buiVStHwfUswEE+u2Rvy/AXw==","shasum":"2e0d78f56d6d6103d5418f6876a02a3d262b62d2","tarball":"https://registry.npmjs.org/@altafonte/create-stencil-component/-/create-stencil-component-1.1.0.tgz","fileCount":6,"unpackedSize":15005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeU+tCRA9TVsSAnZWagAAjUsQAJ7TAmxLL2YHEPZkGAG/\n/U4adi/RtLo9t9m2lrxVwWIBEaDcT73lIlbQs7zfLPBz/C3EZGN2JOv717js\nvj31mOY8ygoB1UiGapEqYvhKre7Owx9TxxXsXgvIRrByjkbYUV6Wad8NZYJh\nD43pvMdv/fiXKJiaPWfE5WfcnKQP5kGHITQbDtUxE5YBSnViqIxYW4Vd36XH\nziueH2CDJ626W9/9m0XYzcppEt2QmRgc/vwXlccRsDsLiakQaU+BxACOij0r\noz+x0uEaVt67H1eM6wn+LPHJGKpeN7vAHMXhS/gGCXwTNj4H4KRvUeKRnzPX\nTcR5CDgvLL9mIdcqo/TD3eqQuwwt41NeQ/fwiq514f8LrBHEzIMCjqQG+Fxk\n3gW8J3xFfq3fAoj4/QQXsk4vDJQwayZHSOJ7JUYWlkJqqg0wh+ZaAg1hfXFn\nihPgDrIz4KIFcvl1jDGPjuIdwn7GIpK5UjUaDStXd/luHOeWlBhAyC5nFjTg\nNusn0sh3Q3kNA6OMrbuJbQI8Xc37MJfSE4d9JN7Z9UXgG55viUfWZiTFMMwI\nZb92sV4TW1f5+tsasQZlTFGfcirOwSAY8vVDHEvOmRM14O5sMkWDyWKBk4tk\n6MEhr17I1VRWuBqGF8ElpT87XTobKRA/zg1acD1d06jcs/31BzIG6pZ7Dzni\nh+vB\r\n=RbiT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlPF1pIXY+q/0kdcxarJk2qhmw5Mww4e/SqIKrOiSjBQIgKTbgA2OoZlGJQw4EP7HxY/xGmx8KvQRvuBxbZm9HjuY="}]},"_npmUser":{"name":"agm-dev","email":"adrian.registros@gmail.com"},"directories":{},"maintainers":[{"name":"tony.martin","email":"tony.martin@altafonte.com"},{"name":"adrm","email":"adrian@adrm.es"},{"name":"agm-dev","email":"adrian.registros@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-stencil-component_1.1.0_1618562989029_0.23368529498375845"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-06T08:54:26.725Z","1.0.0":"2020-11-06T08:54:27.245Z","modified":"2022-05-11T11:50:17.174Z","1.1.0":"2021-04-16T08:49:49.174Z"},"maintainers":[{"email":"joseluis.garcia@altafonte.com","name":"joseluis.garcia.altafonte"},{"email":"adrian@adrm.es","name":"adrm"},{"email":"adrian.registros@gmail.com","name":"agm-dev"},{"email":"tony.martin@altafonte.com","name":"tony.martin"}],"description":"Util to create the required files to add a new component to Altafonte Backoffice's frontend.","homepage":"https://github.com/Altafonte/create-stencil-component#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/Altafonte/create-stencil-component.git"},"author":{"name":"Adrián Gonzalo"},"bugs":{"url":"https://github.com/Altafonte/create-stencil-component/issues"},"license":"MIT","readme":"# create-stencil-component\n\nThe script will create missing directories and the following boilerplate files:\n\n- component-name.tsx\n\n```jsx\nimport { Component, h, Host, ComponentInterface, JSX } from \"@stencil/core\";\n\n@Component({\n  tag: \"af-component-name\",\n  styleUrl: \"component-name.pcss\",\n  scoped: true,\n})\nexport class ComponentName implements ComponentInterface {\n  render(): JSX.Element {\n    return <Host></Host>;\n  }\n}\n```\n\n- component-name.pcss\n\n```\n:host {\n  display: block;\n}\n```\n\n## Installation\n\n```bash\nnpm install --save @altafonte/create-stencil-component\n```\n\n## Usage\n\n```javascript\nconst { createNewComponent } = require(\"@altafonte/create-stencil-component\");\n\nconst componentsDirectory = \"src/components\";\nconst newComponent = \"utils/link\";\n\n// will generate src/components/utils/link directory\n// with link.tsx and link.pcss inside\ncreateNewComponent(componentsDirectory, newComponent);\n```\n\n## Customization\n\nYou can pass an object to configure some behavior of script.\n\nYou can configure:\n\n| Option             | Default | Description                                                                                                            |\n| ------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------- |\n| styleFileExtension | pcss    | Extension of style file created and referenced on TSX file                                                             |\n| type               | scoped  | Writes the component with `shadow: true` or `scoped: true`                                                             |\n| tagPrefix          | af      | The prefix for the component tag. By default `af-${component-name}`. Set it to `\"\"` to create component without prefix |\n\nExample:\n\n```javascript\nconst { createNewComponent } = require(\"@altafonte/create-stencil-component\");\n\nconst componentsDirectory = \"src/components\";\nconst newComponent = \"utils/link\";\n\n// will generate src/components/utils/link directory\n// with link.tsx and link.pcss inside\ncreateNewComponent(componentsDirectory, newComponent, {\n  styleFileExtension: \"css\", // styleUrl: \"link.css\"\n  type: \"shadow\", // shadow: true\n  tagPrefix: \"cool-company\", // tag: cool-company-link\n});\n```\n","readmeFilename":"README.md"}