@justeattakeaway/generator-pie-component

0.24.0 • Public • Published

Currently released NPM version

generator-pie-component

generator-pie-component is a generator for Pie Web Components.


Usage

  1. Installation
  2. Generate the component
  3. Add the component to storybook
  4. Set up Percy visual regression testing
  5. Set up the project label for GitHub

Installation

Build the generator package locally (it is recommended you force the build)

$ yarn build --filter=generator-pie-component --force

Generating a new component

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! 🎉

Setting up Visual Regression Testing:

  • Create a Percy project for the component on the Percy website.
  • From the "Project settings" page, copy the project token value.
  • You need to add the new token value as a repository secret in GitHub. It must be named PERCY_TOKEN_PIE_COMPONENT_NAME. Visual tests will not work/run if this is not set up correctly.

Local development

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

Contributing

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).

Readme

Keywords

Package Sidebar

Install

npm i @justeattakeaway/generator-pie-component

Weekly Downloads

17

Version

0.24.0

License

Apache-2.0

Unpacked Size

3.52 kB

Total Files

2

Last publish

Collaborators

  • ilia.chikmarev
  • phatpt8
  • anastasiia.horban
  • mmakwe-onyeka
  • gregory.palaci
  • roberto.santana
  • siggerzz
  • lizzie.turney
  • jamieomaguire
  • davidpn.11
  • mwh1989
  • ashleynolan
  • fozzie-bot