amiv React Components
This is a collection of reusable React components for use within amiv React applications.
🚀 Quick start
-
Getting Started / Usage
Install the component library with
npm install --save git+https://gitlab.ethz.ch/amiv/react-components.git#2918b741b8321c6b79b7ed3ea575db37ed94268c
Please note that the commit hash is optional
Import the components from
amiv-react-components
. -
Add a new component
Create the component file at
src/components
and add an export to the file./index.js
. Make sure to executenpm run build
before committing. Otherwise the CI Pipeline tests will fail and the Merge Request will be blocked. -
Add a new tutorial
Create a new markdown file at
docs/
. Make sure to name the file the same as the title of the tutorial should be! -
Linting & Formatting
We use
eslint
andprettier
for linting and formatting of the javascript code. You can use the following commands:npm run eslint npm run format
🧐 What's inside?
A quick look at the most important files and directories of the project.
.
├── jsdoc.json
├── docs/
└── src/
├── components/
├── utils/
└── index.js
-
/jsdoc.js
: JSDoc configuration file -
/docs
: Contains tutorial files (.md
) included in the JSDoc documentation website. -
/src
: This directory contains all source code for the components-
/src/components
: Contains all react components. -
/src/utils
: Contains all utility functions and classes. -
/src/index.js
: Entry point for the package. Exports all components.
-
💫 Documentation (Deployment)
The documentation of this package is built as a docker image. See CI Pipeline for details.