Skip to content

Commit 34742f6

Browse files
authored
fix(doc): replace non-existent npm run hippy:debug with hippy:dev (#4537)
Fix documentation that incorrectly references 'npm run hippy:debug' script which does not exist in any of the demo projects. The correct command is 'npm run hippy:dev' which starts compilation and debug server. Fixes #4536
1 parent 170a21f commit 34742f6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Before build the android app, please make sure the SDK and NDK is installed, And
106106
3. Run `npm run init:example [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo]`.
107107
4. Run `npm run debugexample [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo] dev`.
108108

109-
> Or you can `cd` to `driver/js/examples/hippy-react-demo`, `driver/js/examples/hippy-vue-demo` or `driver/js/examples/hippy-vue-next-demo` directory to run `npm run hippy:debug` and `npm run hippy:dev` instead.
109+
> Or you can `cd` to `driver/js/examples/hippy-react-demo`, `driver/js/examples/hippy-vue-demo` or `driver/js/examples/hippy-vue-next-demo` directory to run `npm run hippy:dev` instead.
110110
>
111111
> On example debug mode, npm packages such as @hippy/react, @hippy/vue, @hippy/vue-next are linked to `driver/js/packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` again.
112112
>

driver/js/examples/hippy-react-demo/src/pages/debug.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,16 @@ export default class Debug extends Component {
7272
render() {
7373
const stepTextArray = [
7474
'2. 在前端项目中使用 npm install 安装依赖',
75-
'3. 在前端项目中运行 npm run hippy:dev 编译调试包',
76-
'4. 另开一个命令行窗口,运行 npm run hippy:debug 启动调试服务',
77-
'5. 点击下方的“开始调试”按钮开始调试业务包',
75+
'3. 在前端项目中运行 npm run hippy:dev 启动编译并开启调试服务',
76+
'4. 点击下方的"开始调试"按钮开始调试业务包',
7877
];
7978
if (Platform.OS === 'android') {
8079
stepTextArray.unshift('1. 使用 USB 线连接 Android 手机和电脑,并启动 Hippy');
81-
stepTextArray.push('6. 打开 chrome://inspect,需要确保 localhost:38989 在 Discover network targets 右侧的 Configuration 弹窗中,下方会出现设备列表,点击 Inspect 进行调试');
80+
stepTextArray.push('5. 打开 chrome://inspect,需要确保 localhost:38989 在 Discover network targets 右侧的 Configuration 弹窗中,下方会出现设备列表,点击 Inspect 进行调试');
8281
} else if (Platform.OS === 'ios') {
8382
stepTextArray.unshift('1. 启动 iOS 模拟器并启动打开 HippyDemo');
84-
stepTextArray.push('6. 打开 Safari -> Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)');
85-
stepTextArray.push('注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务');
83+
stepTextArray.push('5. 打开 Safari -> Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)');
84+
stepTextArray.push('注意:每次插拔 USB 线后都需要通过 npm run hippy:dev 重启调试服务');
8685
}
8786
// eslint-disable-next-line react/no-array-index-key
8887
const renderSteps = () => stepTextArray.map((v, i) => <Text style={styles.stepText} key={`steps-${i}`}>{v}</Text>);

0 commit comments

Comments
 (0)