Home

amiv React Components

pipeline status

This is a collection of reusable React components for use within amiv React applications.

🚀 Quick start

  1. 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.

  2. Add a new component

    Create the component file at src/components and add an export to the file ./index.js. Make sure to execute npm run build before committing. Otherwise the CI Pipeline tests will fail and the Merge Request will be blocked.

  3. 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!

  4. Linting & Formatting

    We use eslint and prettier 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
  1. /jsdoc.js: JSDoc configuration file

  2. /docs: Contains tutorial files (.md) included in the JSDoc documentation website.

  3. /src: This directory contains all source code for the components

    1. /src/components: Contains all react components.

    2. /src/utils: Contains all utility functions and classes.

    3. /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.

⚙ Technologies

Frontend Frameworks & Libraries

Build Tools

Development Tools

  • ESlint

  • Prettier

    Most IDEs have plugins for those tools. VS Code is the recommended IDE.