使用方法
-
npm install -g react-simple-project-cwg
-
np --init --dir=demo
初始化项目代码到demo目录 -
cd demo
进入demo目录 -
npm install
安装依赖项 -
npm run start
运行项目,npm run mitm
运行代理,如果没有安装过cmitm工具,请先安装npm install -g cwg-mitm-tools
。理论上运行cmitm会自动设置系统代理,如果没有设置请手动把 http和https的代理设置为 127.0.0.1 ,端口号8083 -
npm run build
打包项目到 dist/ 目录下 -
打开 http://mydemo.xyz 查看demo页面
-
np --readme
运行本地readme,打开 http://127.0.0.1:16666 可以快速查阅框架内公共方法及模块