Building documents with DumI (1)
Dumi is a documentation tool designed for component development scenarios
Dumi website
Today we are going to build a Dumi document from scratch.
Environment to prepare
First make sure node is 10.13 or later
V12.18.3 $node - vCopy the code
Initialize scaffolding
There are two ways to initialize scaffolding:
- Component development scaffolding
- Static site scaffolding
Today we use component development scaffolding, another way to view the documentation yourself
$NPX @umijs/create-dumi-lib # or $yarn create @umijs/dumi-lib # Initialize a site-mode component development scaffolding $ npx @umijs/create-dumi-lib --site # or $ yarn create @umijs/dumi-lib --siteCopy the code
If the installation is slow, switch to CNPM or Tyarn
Switch # NPM CNPM $NPM install - g CNPM - registry=https://registry.npm.taobao.org # to check the version number $CNPM - v # yarn tyarn $CNPM switch install -g yarn tyarnCopy the code
perform
After initialization, run NPM install or YARN to install dependencies
After installation, run NPM run start or YARN start
Build & Deploy
Run NPM run docs:build or YARN docs:build