| Maintainers | Technologies |
|---|---|
| @Chris-Baker | React (Typescript / NextJS / Styled Components) |
├── .github/workflows <-- Github autommation actions for deployment to GH Pages
├── _templates <-- Hygen code generation templates
├── public <-- Static files for NextJS to serve
└── src
│ ├── components <-- React components
│ │ ├── atoms <-- Small components
│ │ ├── molecules <-- Medium components
│ │ ├── organisms <-- Large components
│ │ ├── views <-- Page layouts
│ │ └── icons <-- Icon components / SVG wrappers
│ ├── contexts <-- React contexts
│ ├── fixtures <-- static fixture data
│ ├── helpers <-- pure functions
│ ├── hooks <-- React hooks
│ ├── pages <-- App root and page routing components
│ ├── services <-- Service and API clients
│ ├── styles <-- Bootstrap theme and other global styles
│ └── types <-- Project global types and interfaces
| Tool | Version | Notes |
|---|---|---|
| NodeJS | lts/gallium |
Easy version management via nvm. Version will be auto-selected if using zsh on MacOS. |
- Run
nvm usein order to switch to the defined project version of NodeJS - Run
npm cifrom the root of the repository.
Run the dev server npm run dev which will start the NextJS application.
Prettier handles code style and is complimented by ESLint that runs in CI, or by running npm run lint.
React components and pages can be generated using hygen.
Running the following command will create a Modal component in ./src/components/molecules
$ npx hygen component new --type molecule --name modalAll the required component files are generated including styles.
./src/components/molecules/modal
-- index.tsx
-- modal.styles.tsThere are four types of component: atom, molecule, organism and view which also have the shorthand aliases a, m o, and v.
Atom is the default if the --type switch is omitted.
Different kinds of components can be generated like so:
Atoms
Atoms live in ./src/components/atoms
$ npx hygen component new --type atom --name tab
$ npx hygen component new --type a --name tabMolecules
Molecules live in ./src/components/molecules
$ npx hygen component new --type molecule --name tab-group
$ npx hygen component new --type m --name tab-groupOrganisms
Organisms live in ./src/components/organisms
$ npx hygen component new --type organism --name tabbed-content
$ npx hygen component new --type o --name tabbed-contentViews
Views live in ./src/components/views
$ npx hygen component new --type views --name home
$ npx hygen component new --type v --name homeRunning the following command will create a Home page in ./src/pages
$ npx hygen page new --name home./src/pages
-- home.tsxGithub action should trigger on PUSH to main. Builds site and deploys to github pages at https://playmint.github.io/ds-leaderboard/
This URL may be plugged into the COG FE Plugin System