Skip to content

Commit bc8b23a

Browse files
Kureevfacebook-github-bot
authored andcommitted
Run application using package.json scripts
Summary: **Motivation:** According to the meeting notes published by mkonicek yesterday, RN should support `yarn run ios` and `yarn run android` commands. **Test plan (required)** - [x] Generate a new project and start scaffolded app using `yarn(npm) run ios(android)` Closes facebook#12004 Differential Revision: D4441837 Pulled By: mkonicek fbshipit-source-id: 250f7a9e1efc59e0caa5c2c071b59b97e14e939b
1 parent 8f5a72d commit bc8b23a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

react-native-cli/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ function createProject(name, options) {
240240
version: '0.0.1',
241241
private: true,
242242
scripts: {
243-
start: 'node node_modules/react-native/local-cli/cli.js start'
243+
start: 'node node_modules/react-native/local-cli/cli.js start',
244+
ios: 'react-native run-ios',
245+
android: 'react-native run-android',
244246
}
245247
};
246248
fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(packageJson));

0 commit comments

Comments
 (0)