-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: dev contributing link to site (#1861)
Closes #1817
- Loading branch information
1 parent
45f02ae
commit 33b2272
Showing
1 changed file
with
3 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,6 @@ | ||
# Developing the Red Hat Design System | ||
|
||
## Prerequisites | ||
Please see our [detailed contributing guidelines][guidelines] and our [development wiki][wiki]. | ||
|
||
To develop components or design system documentation, you must first install | ||
some required software, namely node.js. We use [nvm](https://github.com/nvm-sh/nvm) | ||
to ensure a uniform development environment. | ||
|
||
### Install Node | ||
Fedora/RHEL users should install `nvm` for bash directly from GitHub | ||
|
||
```bash | ||
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | ||
``` | ||
|
||
Mac users should [Install homebrew](https://brew.sh/), then use that to install `nvm`: | ||
|
||
```bash | ||
brew install nvm | ||
``` | ||
|
||
### Clone the Repository | ||
|
||
Then change directory to it: | ||
|
||
```bash | ||
git clone [email protected]:redhat-ux/red-hat-design-system | ||
cd red-hat-design-system | ||
``` | ||
|
||
### Install Dependencies | ||
Install the right node version using `nvm`, then install the `node_modules` dependencies: | ||
|
||
```bash | ||
nvm use | ||
npm ci | ||
``` | ||
|
||
## Generate an Element | ||
|
||
RHDS uses tools and libraries from [`@patternfly/patternfly-elements`](https://github.com/patternfly/patternfly-elements). | ||
Use the PatternFly Elements generator to scaffold an element: | ||
|
||
```bash | ||
npm init @patternfly/element | ||
``` | ||
|
||
## Run the Dev Server | ||
Run the dev server to develop components. Your changes will automatically refresh the browser | ||
window: | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
This starts a local dev server at http://localhost:8000 and the 11ty dev server for the docs site at http://localhost:8080 | ||
|
||
To run *only* the components dev server, first run the build, then run the dev | ||
server: | ||
```bash | ||
npm run build | ||
npx wds --open --watch | ||
``` | ||
|
||
To run *only* the docs dev server, first run the build, then 11ty | ||
```bash | ||
npm run build | ||
npx eleventy --serve --incremental | ||
``` | ||
[guidelines]: https://ux.redhat.com/get-started/developers/contributing/ | ||
[wiki]: https://github.com/RedHat-UX/red-hat-design-system/wiki |