The antd admin command line utility.
Install, create and start.
# Install $ npm install antd-admin-cli -g # Create app $ atda new myapp # Start app $ cd myapp $ yarn start
We have 3 commands: new, init and generate(alias g).
Create app with new directory.
$ atda new myapp $ atda new myapp --simple $ atda new myapp --no-install
--no-install-- Disable npm install after files created
Create app in current directory. It's options is the same as atda new.
Generate route, model and component.
$ atda g route product-list $ atda g model products $ atda g component Editor $ atda g component Users/UserModal $ atda g component Header --no-css
. ├── public ├── index.html # HTML for entry file ├── src # Source directory ├── assets # Store images, icons, ... ├── components # UI components ├── index.js # Enry file ├── router.js # Router configuration ├── models # Dva models ├── routes # Route components ├── services # Used for communicate with server └── utils # Utils └── request.js # A util wrapped dva/fetch ├── .editorconfig # ├── .eslintrc # Eslint config ├── .gitignore # ├── .roadhogrc # Roadhog config └── package.json #
antd-admin-cli use roadhog for build and server, view roadhog#Configuration (中文版) for details.