rmdx v1.0.2
rmdx
Introduce
rmdx It is a scaffold that can quickly create react UI component library
Command
Install
1.global installation rmdx scaffold
npm install rmdx -g
or
yarn add rmdx -g2.download template directly https://gitee.com/ws18250840411/rmdx-template)
create project
implement
rmdxenter project name
? Your project name -> react-uiselect CSS preprocessor
? Select css preprocessor -> lessinstall 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/rmdx.min.js",
"jsdelivr": "dist/rmdx.min.js",
"style": "dist/rmdx.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.