Skip to content

Commit

Permalink
Run application using package.json scripts
Browse files Browse the repository at this point in the history
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 #12004

Differential Revision: D4441837

Pulled By: mkonicek

fbshipit-source-id: 250f7a9e1efc59e0caa5c2c071b59b97e14e939b
  • Loading branch information
Kureev authored and facebook-github-bot committed Jan 20, 2017
1 parent 8f5a72d commit bc8b23a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion react-native-cli/index.js
Expand Up @@ -240,7 +240,9 @@ function createProject(name, options) {
version: '0.0.1',
private: true,
scripts: {
start: 'node node_modules/react-native/local-cli/cli.js start'
start: 'node node_modules/react-native/local-cli/cli.js start',
ios: 'react-native run-ios',
android: 'react-native run-android',
}
};
fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(packageJson));
Expand Down

0 comments on commit bc8b23a

Please sign in to comment.