{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/4342","repository_url":"https://api.github.com/repos/facebook/create-react-app","labels_url":"https://api.github.com/repos/facebook/create-react-app/issues/4342/labels{/name}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/4342/comments","events_url":"https://api.github.com/repos/facebook/create-react-app/issues/4342/events","html_url":"https://github.com/facebook/create-react-app/issues/4342","id":316633875,"number":4342,"title":"Consider moving react-scripts to devDependencies in the generated package","user":{"login":"nickmccurdy","id":927220,"avatar_url":"https://avatars0.githubusercontent.com/u/927220?v=4","gravatar_id":"","url":"https://api.github.com/users/nickmccurdy","html_url":"https://github.com/nickmccurdy","followers_url":"https://api.github.com/users/nickmccurdy/followers","following_url":"https://api.github.com/users/nickmccurdy/following{/other_user}","gists_url":"https://api.github.com/users/nickmccurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/nickmccurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickmccurdy/subscriptions","organizations_url":"https://api.github.com/users/nickmccurdy/orgs","repos_url":"https://api.github.com/users/nickmccurdy/repos","events_url":"https://api.github.com/users/nickmccurdy/events{/privacy}","received_events_url":"https://api.github.com/users/nickmccurdy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-23T01:35:51Z","updated_at":"2018-04-23T01:47:02Z","closed_at":"2018-04-23T01:47:02Z","author_association":"NONE","body":"It is a common convention for build tools to be in `devDependencies` instead of `dependencies`. I have noticed that `create-react-app` generates a `package.json` with only `dependencies`, and I think the `react-scripts` dependency counts as a build and testing tool which can be moved to `devDependencies`. If this hasn't already been discussed and it's possible for us to try it, I can start a PR on the template generator.\r\n\r\nNote that even though `react-scripts` generates production code, npm still considers it a build tool that is not necessary in production environments because it does not produce code that relies on native Node bindings in production. Users can still safely install `devDependencies` in production environments if they can't build outside of their production environment, though I feel this is uncommon with GitHub Pages and Travis being so popular.\r\n\r\nAccording to the npm docs for [devDependencies](https://docs.npmjs.com/files/package.json#devdependencies): \r\n> If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.\r\n\r\n> In this case, it's best to map these additional items in a devDependencies object.\r\n\r\n> These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm configuration param. See npm-config for more on the topic.\r\n\r\n> For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepare script to do this, and make the required package a devDependency."}}
{"actor":{"display_login":"gaearon"}}