duadua v1.0.2
duadua
Introduce
duadua It is a scaffold that can quickly create react UI component library
Command
1.global installation duadua scaffold
npm install duadua -g
or
yarn add duadua -g2.create project
implement
duaduaenter project name
? Your project name -> react-uiselect CSS preprocessor
? Select css preprocessor -> less3.install dependencies
cd react-ui
npm install 或 yarnParticipate in development
dev
Run the local development environment.
npm run dev or yarn devWhen running the dev command, Moli cli passes vite( https://github.com/vitejs/vite )Start a local server to preview documents and samples during development.
build
Build the component library.
npm run build or yarn buildRunning the build command will generate component code that can be used in the production environment in the es 、lib and dist directories.
When publishing NPM, please add the following configuration to package.json, so that the NPM package can be correctly identified:
// package.json
{
"main": "lib/index.js",
"module": "es/index.js",
"types": "es/index.d.ts",
"typings": "es/index.d.ts",
"unpkg": "dist/duadua.min.js",
"jsdelivr": "dist/duadua.min.js",
"style": "dist/duadua.min.css",
"files": ["dist", "lib", "es"]
}build-site
npm run build-site or yarn build-siteBuild a document site and generate document site code that can be used in the production environment in the dist site directory.