{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/369","repository_url":"https://api.github.com/repos/sindresorhus/ava","labels_url":"https://api.github.com/repos/sindresorhus/ava/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/369/comments","events_url":"https://api.github.com/repos/sindresorhus/ava/issues/369/events","html_url":"https://github.com/sindresorhus/ava/issues/369","id":123900718,"number":369,"title":"Reduce installed package size","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sindresorhus/ava/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sindresorhus/ava/labels/good%20for%20beginner","name":"good for beginner","color":"5ed9c7"},{"url":"https://api.github.com/repos/sindresorhus/ava/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/sindresorhus/ava/labels/low%20priority","name":"low priority","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-25T23:25:44Z","updated_at":"2016-02-29T15:48:00Z","closed_at":null,"body":"Latest master (b79fdfd8b0e5632eae338b563af1c3be29fecbca), when installed with npm@3.5.2, is 68 MB. Most of that is Babel stuff.\r\n\r\nWe should look into ways we can reduce the size.\r\n\r\n<img width=\"400\" alt=\"screen shot 2015-12-26 at 00 20 16\" src=\"https://cloud.githubusercontent.com/assets/170270/12004599/76c6a812-ab66-11e5-8265-2fae153efeec.png\">\r\n\r\n*(Output from DaisyDisk)*\r\n\r\nTurns out every single Babel package includes a dependency on `babel-runtime` and for some reason it's not deduped by npm@3, not even with `npm dedupe`:\r\n\r\n```\r\n~/dev/ava/node_modules master*\r\n❯ find . -type d -name \"babel-runtime\" -print \r\n./babel-code-frame/node_modules/babel-runtime\r\n./babel-core/node_modules/babel-runtime\r\n./babel-generator/node_modules/babel-runtime\r\n./babel-helper-builder-binary-assignment-operator-visitor/node_modules/babel-runtime\r\n./babel-helper-call-delegate/node_modules/babel-runtime\r\n./babel-helper-define-map/node_modules/babel-runtime\r\n./babel-helper-explode-assignable-expression/node_modules/babel-runtime\r\n./babel-helper-function-name/node_modules/babel-runtime\r\n./babel-helper-get-function-arity/node_modules/babel-runtime\r\n./babel-helper-hoist-variables/node_modules/babel-runtime\r\n./babel-helper-optimise-call-expression/node_modules/babel-runtime\r\n./babel-helper-regex/node_modules/babel-runtime\r\n./babel-helper-remap-async-to-generator/node_modules/babel-runtime\r\n./babel-helper-replace-supers/node_modules/babel-runtime\r\n./babel-helpers/node_modules/babel-runtime\r\n./babel-messages/node_modules/babel-runtime\r\n./babel-plugin-check-es2015-constants/node_modules/babel-runtime\r\n./babel-plugin-syntax-async-functions/node_modules/babel-runtime\r\n./babel-plugin-syntax-exponentiation-operator/node_modules/babel-runtime\r\n./babel-plugin-syntax-object-rest-spread/node_modules/babel-runtime\r\n./babel-plugin-transform-async-to-generator/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-arrow-functions/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-block-scoped-functions/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-block-scoping/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-classes/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-computed-properties/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-destructuring/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-for-of/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-function-name/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-literals/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-modules-commonjs/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-object-super/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-parameters/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-shorthand-properties/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-spread/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-sticky-regex/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-template-literals/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-typeof-symbol/node_modules/babel-runtime\r\n./babel-plugin-transform-es2015-unicode-regex/node_modules/babel-runtime\r\n./babel-plugin-transform-exponentiation-operator/node_modules/babel-runtime\r\n./babel-plugin-transform-object-rest-spread/node_modules/babel-runtime\r\n./babel-plugin-transform-regenerator/node_modules/babel-runtime\r\n./babel-plugin-transform-runtime/node_modules/babel-runtime\r\n./babel-plugin-transform-strict-mode/node_modules/babel-runtime\r\n./babel-register/node_modules/babel-runtime\r\n./babel-runtime\r\n./babel-template/node_modules/babel-runtime\r\n./babel-traverse/node_modules/babel-runtime\r\n./babel-types/node_modules/babel-runtime\r\n./babylon/node_modules/babel-runtime\r\n```"},"comment":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/comments/190263918","html_url":"https://github.com/sindresorhus/ava/issues/369#issuecomment-190263918","issue_url":"https://api.github.com/repos/sindresorhus/ava/issues/369","id":190263918,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T15:48:00Z","updated_at":"2016-02-29T15:48:00Z","body":"@novemberborn There are some things that can be done even if the worst offender, Babel and fsevents, are out of our control. Many packages include junk like tests or examples directory, etc. I did a PR marathon a few years ago for Yeoman on 100+ different packages adding a \"files\" property to their package.json to reduce the total disk size of the dependency tree. That helped a lot. Pretty much have this still open for when I have time to do the same here."}}