web前端开发的脚手架
npm install -g yo
npm install -g generator-webx
npm install -g yarn
安装后需要手动开启 yo webx yarn --yes | --no, 建议安装并开启(这样项目依赖包安装会更快)
yo webx
目前支持类型: H5、 React (后续会支持的更多...)
首次使用建议选择 yes 构建后会生成一个demo 有助于更好的理解开发方式
H5:
├── src
│ ├── components
│ │
│ ├── common
│ │
│ ├── third
│ │
│ ├── index
│ │
│ ├── utils
│ │
├── node_modules
├── package.json
└── webpack.config.js
React:
├── config
│ ├── webpack.dev.js
│ └── webpack.prod.js
├── src
│ ├── components
│ │
│ ├── common
│ │
│ ├── static
│ │
│ ├── index.jsx
│ │
│ ├── index.html
│ │
│ ├── index.scss
│ │
├── node_modules
├── .babelrc
├── package.json
└── postcss.config.js
项目开发过程使用,启动服务,实时刷新
npm run dev
开发完成之后打包文件
npm run pro