
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@justeattakeaway/generator-pie-component
Advanced tools
generator-pie-component is a generator for Pie Web Components.
Build the generator package locally (it is recommended you force the build)
$ yarn build --filter=generator-pie-component --force
To run the generator, use this command from the root directory within the monorepo:
$ npx yo @justeattakeaway/pie-component
An interactive prompt should now be displayed asking for a component name.
Once you have completed all the prompts, your scaffolded component will be generated! 🎉
PERCY_TOKEN_PIE_COMPONENT_NAME. Visual tests will not work/run if this is not set up correctly.The generator does not currently support automatic generation of sub-components. To add a sub-component, follow these steps:
vite.config.ts to match the following:export default viteConfig({
build: {
lib: {
entry: {
'pie-sub-component/index': 'src/pie-sub-component/index.ts',
'pie-sub-component/react': 'src/pie-sub-component/react.ts',
},
},
},
dtsConfig: {
entryRoot: 'src',
rollupTypes: false,
},
});
npx add-components from the monorepo root to update the webc package exports.Install the dependencies. Note that this, and the following commands below, should be run from the root of the monorepo:
yarn
To build the generator-pie-component package, run the following command:
yarn build --filter=generator-pie-component
You can also build the component in watch mode if desired with the following command:
yarn watch --filter=generator-pie-component
In order to contribute to the generator-pie-component, it's advised to link your local build of the generator to Yeoman.
To do this, run yarn link from the root of the generator-pie-component folder in the mono-repo.
Once you have done this, running npx yo @justeattakeaway/pie-component will run your local copy of the generator (rather than the version installed globally via NPM/Yarn).
FAQs
A generator for PIE Web Components
We found that @justeattakeaway/generator-pie-component demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.