Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.57 KB

README.cn.md

File metadata and controls

65 lines (43 loc) · 2.57 KB

ocap-react-starter

集成了 OCAP JS SDK 的 React 种子项目,使用 create-react-app 初始化。

For English documentation, please checkout README.md

使用方法

1. 作为 create-react-app 的 react-scripts

需要安装 npm v6+,自带了 npx 命令,直接使用如下命令初始化项目:

npx create-react-app my-ocap-app --scripts-version @arcblock/react-scripts
cd my-ocap-app
yarn start

2. 作为种子项目:直接克隆使用

git clone https://github.com/ArcBlock/ocap-react-starter.git
cd ocap-react-starter
yarn
yarn serve

如果是国内开发者,建议使用淘宝源安装依赖: yarn --registry=https://registry.npm.taobao.org

OCAP SDK 代码示例

OCAP SDK 文档

OCAP 提供的工具

项目内含的三方库

项目部署

如果看到这里,恭喜你,马上就可以把项目部署到公网,给大家试用了,我们建议使用 now.sh 部署应用,步骤如下:

  1. https://zeit.co 创建账号
  2. 安装 zeit cli: npm install -g now
  3. 登录 zeit-cli, now login
  4. deploy.sh 中设置项目的域名 alias
  5. 执行 npm run deploy

部署成功!很期待你的应用出现在我们的 APP Gallery 里面。