To create an extension:
- create an empty repo for your new extension
- clone that repo to your local machine
cd
into the directory created by cloning- run
npx tmplr patternfly/patternfly-extension-seed
- enter your information when prompted
- npm scope should start with an @ symbol, i.e.
@patternfly
- extension name should be in sentence case but without any punctuation, i.e.
Patternfly extension seed
- repo URL should be the plain URL of the repo not URL used to clone, i.e.
https://github.com/patternfly/patternfly-extension-seed
- npm scope should start with an @ symbol, i.e.
- run
yarn
to install dependencies
From there you can:
- run
yarn start
to build and start the development server - run
yarn test
to run the tests for the demo component - run
yarn lint
to run the linter - run
yarn build:docs
followed byyarn serve:docs
, then runyarn test:a11y
in a new terminal window to run our accessibility tests for the demo component. Once the accessibility tests have finished running you can runyarn serve:a11y
to locally view the generated report.
Upon pushing to your remote repo GitHub Actions should run which ensure that the extension can properly build, pass all tests, pass the linter check, and pass all accessibility tests.
If you add a token to the repo with the name NPM_TOKEN
and automation permissions on NPM it should also automatically deploy the package to NPM once it has passed the above checks.