Skip to content

Commit

Permalink
Merge pull request #1102 from matt-oakes/issue-1099-react-native-reac…
Browse files Browse the repository at this point in the history
…t-dom

Add react-dom to the devDependency list for React Native projects
  • Loading branch information
ndelangen authored May 23, 2017
2 parents 52cffb8 + 5e9478f commit fa3d19d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/cli/generators/REACT_NATIVE/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ module.exports = latestVersion('@storybook/react-native').then(version => {

const packageJson = helpers.getPackageJson();

packageJson.dependencies = packageJson.dependencies || {};
packageJson.devDependencies = packageJson.devDependencies || {};

packageJson.devDependencies['@storybook/react-native'] = `^${version}`;

if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) {
packageJson.devDependencies['react-dom'] = '^15.5.4';
}

packageJson.scripts = packageJson.scripts || {};
packageJson.scripts['storybook'] = 'storybook start -p 7007';

Expand Down

0 comments on commit fa3d19d

Please sign in to comment.