Files
fleet/docs/Contributing/adding-new-UI-components.md
T
Jacob ShandlingandJacob Shandling 25f1ede3e1 Create UI component generator (#11644)
## `generate`: a script to automatically generate UI component
boilerplate
<img width="2103" alt="Screenshot 2023-05-11 at 10 50 11 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/d5570868-51b4-4602-90a0-2f7722b9d9ef">

* Putting in this PR now since @fleetdm/frontend folks seemed keen to
use this immediately
* TODO:
- create Makefile command for using this functionality from the project
root
  - improve documentation

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-05-11 12:00:27 -07:00

525 B

Using generate to create boilerplate for a new Fleet UI component

Basic steps to create a new UI component

  1. cd into fleet/frontend/components
  2. Run ./generate -n NewComponentName, replacing NewComponentName with the desired name for your new component.
  3. A directory and all boilerplate for the various files of the component will be generated in fleet/frontend/components

You can also run ./generate -h for information about the other options available (overwrite and specifying destination)