首页 > 服务市场 > 店铺重构RN开放文档 > JD React安装使用说明

JD React安装使用说明

1.package.json 中新增依赖
"dependencies": {
"@areslabs/jdreact-core-scripts": "^1.0.0",
"@areslabs/jdreact-core-web": "^1.0.0"
}
2.package.json 中新增如下 scripts
"scripts": {
"clean": "rm -rf node_modules/@areslabs/* && rm -rf node_modules/react-native && rm -rf scripts",
"update": "npm run clean && npm install",
"postinstall": "cp -rf node_modules/@areslabs/jdreact-core-scripts/scripts . && cp -rf node_modules/@areslabs/jdreact-core-scripts/patch/* node_modules/",
"start": "node node_modules/react-native/local-cli/cli.js start",
"web-init": "node ./node_modules/@areslabs/jdreact-core-web/local-cli/cli.js init",
"web-start": "node ./node_modules/@areslabs/jdreact-core-web/local-cli/cli.js start",
"web-bundle": "rm -rf build-web && node ./node_modules/@areslabs/jdreact-core-web/local-cli/cli.js bundle"
},
3.安装
npm install