Documentation for @esmalley/react-material-ui.
This repository contains the documentation for the React Material UI component library.
Ensure you have Node.js installed on your machine.
Clone this repository and install the dependencies:
npm installThis is intended to be worked on in tandem with react-material-ui. The docs page will be the place to test and develop new feature for that package.
Assuming both repo are installed and set up, to link them and develop do this:
In react-material-ui
npm linkIn react-material-ui-docs
npm link @esmalley/react-material-uiIn react-material-ui
npm run watchIn react-material-ui-docs
npm run devThe application will be available at http://localhost:3002.
To create an optimized production build:
npm run buildTo run the production build:
npm run startAlternatively, you can use npm run cluster to run the production server using a clustered approach.
This project uses the Next.js App Router. To add a new documentation page for a component:
- Create
app/<group>/<name>/page.tsx(orapp/<name>/page.tsxfor a top-level entry). - Implement the showcase in
page.tsx, following the template in.agents/conventions.md. - Add a matching entry to the
sectionsarray incomponents/Sidebar.tsx. A page without one has no link and is unreachable. - If you added a new group that should start expanded, add its
valueto the default-expanded set in the same file. - Run
npm run coverageto confirm no library export is left undocumented.
The structure of the app/ directory determines the URL paths for the documentation.
| Script | Description |
|---|---|
dev |
Runs the development server at http://localhost:3002. |
build |
Builds the production-ready Next.js application. |
start |
Starts the production server at http://localhost:3002. |
cluster |
Runs the production server in cluster mode. |