titanOne3.5支持ES6标准语法,开发过程中,依赖UmiJS构建编译启动服务。
实例项目下载
可使用Git命令下载实例项目quickstart,其中提供了默认配置以及规范的目录结构以及demo。
1> 使用git下载项目源码:
ssh下载:
git clone git@192.168.10.129:frontend-team/titanOne-quickstart-react.git
http下载:
git clone http://192.168.10.129:90/frontend-team/titanOne-quickstart-react.git
2> 进入项目实例目录examples并安装依赖:
cd examples && yarn install
web启动方式:
npm start
可通过浏览器直接访问主页
http://127.0.0.1:8080/index/index.html
electron启动方式:
npm run start:electron
备注:安装依赖 yarn install 之前确保已经连接公司私服,列出所有私服, 并查看当前私服:
nrm ls
比如:
npm verb config Skipping project config: /Users/scm/.npmrc. (matches userconfig)
* 152 ---- http://192.168.10.152:7001/
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
taobao - https://registry.npm.taobao.org/
nj ----- https://registry.nodejitsu.com/
rednpm - http://registry.mirror.cqupt.edu.cn/
npmMirror https://skimdb.npmjs.com/registry/
确保当前指定私服为:
152 http://192.168.10.152:7001/
如果未添加私服,可通过命令添加:
nrm add 152 http://192.168.10.152:7001/
nrm use 152
如果全局未安装nrm可以通过命令:yarn install nrm -g 全局安装。
