如何查看是否安装成功:黑窗口(命令行)中输入:node -v
图片.png
在黑窗口(命令行)中输入:npm install tnpm -g --registry=http://registry.npm.alibaba-inc.com
通过 npm 安装 dva-cli 并确保版本是 0.7.0
或以上。
$ npm install dva-cli -g$ dva -v0.7.0
安装完 dva-cli 之后,就可以在命令行里访问到 dva
命令([不能访问?](http://stackoverflow.com/questions/15054388/global-node-modules-not-installing-correctly-command-not-found))。现在,你可以通过 dva new
创建新应用。
$ dva new dva-quickstart
这会创建 dva-quickstart
目录,包含项目初始化目录和文件,并提供开发服务器、构建脚本、数据 mock 服务、代理服务器等功能。
在黑窗口(命令行)中输入:tnpm install --verbose //拉下来代码后要执行tnpm install 下载js的依赖包。verbose是为了查看下载包的进度
然后我们 在黑窗口(命令行)中输入:cd
进入 dva-quickstart
目录,并启动开发服务器:
$ cd dva-quickstart
$ npm start
图片.png
几秒钟后,你会看到以下输出:
Compiled successfully!The app is running at: http://localhost:8000/Note that the development build is not optimized.To create a production build, use npm run build.
在浏览器里打开 [http://localhost:8000](http://localhost:8000/) ,你会看到 dva 的欢迎界面。
https://github.com/dvajs/dva-docs/blob/master/v1/zh-cn/tutorial/01-%E6%A6%82%E8%A6%81.md/
https://github.com/sorrycc/blog/issues/18 https://www.npmjs.com/package/roadhog
https://github.com/ruanyf/jstraining/blob/master/docs/react.md
http://gitlab.alibaba-inc.com/aliyun/sales-console-frontend-mobile
https://github.com/zuiidea/antd-admin
http://redux.js.org(中文文档)