Overview:
dumi is a static site generator designed for component library development. It is built to simplify the process of creating and managing documentation for component libraries.
Features:
- Static Site Generation: dumi generates static HTML files for easy deployment and hosting.
- Component Library Development: dumi is specifically designed for managing and documenting component libraries.
- Online Examples and Documentation: Users can visit the official dumi site for online examples and comprehensive documentation.
- Contributing: Users can refer to the CONTRIBUTING.md file for guidelines on how to contribute to the dumi project.
- Badge: dumi provides a README badge to showcase the usage of the library.
Installation:
To install dumi, you need to have Node.js and npm installed on your machine. Once you have them installed, you can follow these steps:
- Open your terminal or command prompt.
- Run the following command to install dumi globally:
npm install dumi -g
- Create a new directory for your component library project:
mkdir my-component-library
cd my-component-library
- Initialize the project with npm:
npm init -y
- Install dumi as a dev dependency:
npm install dumi --save-dev
- Create a new file named
.umirc.ts
and add the following configuration:
export default {
title: 'My Component Library',
}
- Create a new file named
src/index.tsx
and add your component code in it. - Start the dumi server by running the following command in your terminal:
dumi dev
Summary:
In summary, dumi is a static site generator that simplifies the process of managing and documenting component libraries. It provides features such as static site generation, online examples and documentation, and a badge to showcase library usage. By following the installation guide, users can easily set up dumi and start developing their own component libraries with ease.