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 -g
2.download template directly https://gitee.com/ws18250840411/rmdx-template)
create project
implement
rmdx
enter project name
? Your project name -> react-ui
select CSS preprocessor
? Select css preprocessor -> less
install dependencies
cd react-ui
npm install 或 yarn
Participate in development
dev
Run the local development environment.
npm run dev or yarn dev
When 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 build
Running 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-site
Build a document site and generate document site code that can be used in the production environment in the dist site
directory.