{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2818","repository_url":"https://api.github.com/repos/less/less.js","labels_url":"https://api.github.com/repos/less/less.js/issues/2818/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2818/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2818/events","html_url":"https://github.com/less/less.js/pull/2818","id":134171579,"number":2818,"title":"include only necessary files in npm package","user":{"login":"deepsweet","id":266822,"avatar_url":"https://avatars.githubusercontent.com/u/266822?v=3","gravatar_id":"","url":"https://api.github.com/users/deepsweet","html_url":"https://github.com/deepsweet","followers_url":"https://api.github.com/users/deepsweet/followers","following_url":"https://api.github.com/users/deepsweet/following{/other_user}","gists_url":"https://api.github.com/users/deepsweet/gists{/gist_id}","starred_url":"https://api.github.com/users/deepsweet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepsweet/subscriptions","organizations_url":"https://api.github.com/users/deepsweet/orgs","repos_url":"https://api.github.com/users/deepsweet/repos","events_url":"https://api.github.com/users/deepsweet/events{/privacy}","received_events_url":"https://api.github.com/users/deepsweet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-17T04:04:30Z","updated_at":"2016-02-17T04:38:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/less/less.js/pulls/2818","html_url":"https://github.com/less/less.js/pull/2818","diff_url":"https://github.com/less/less.js/pull/2818.diff","patch_url":"https://github.com/less/less.js/pull/2818.patch"},"body":"```\r\n$ tree node_modules/less -I node_modules -L 2\r\n\r\nnode_modules/less\r\n├── bin/\r\n│   └── lessc*\r\n├── dist/\r\n│   ├── less.js\r\n│   └── less.min.js\r\n├── lib/\r\n│   ├── less/\r\n│   ├── less-browser/\r\n│   ├── less-node/\r\n│   ├── less-rhino/\r\n│   └── source-map/\r\n├── test/\r\n│   ├── browser/\r\n│   ├── css/\r\n│   ├── data/\r\n│   ├── less/\r\n│   ├── less-bom/\r\n│   ├── plugins/\r\n│   ├── rhino/\r\n│   ├── sourcemaps/\r\n│   ├── copy-bom.js\r\n│   ├── index.js\r\n│   ├── less-test.js\r\n│   └── modify-vars.js\r\n├── .jscsrc\r\n├── .jshintrc\r\n├── .npmignore\r\n├── .travis.yml\r\n├── CHANGELOG.md\r\n├── CONTRIBUTING.md\r\n├── Gruntfile.js\r\n├── LICENSE\r\n├── README.md\r\n├── appveyor.yml\r\n├── bower.json\r\n├── browser.js\r\n├── build.gradle\r\n├── gradlew*\r\n├── gradlew.bat\r\n├── index.js\r\n└── package.json\r\n```\r\n\r\n```\r\n$ du -sh node_modules/less/test/\r\n\r\n2.9M node_modules/less/test/\r\n```\r\n\r\nLoading unnecessary files is one of the reasons `npm install`s take so darn long. Anton Rudeshko very well put it in [his article](http://www.rudeshko.com/web/2014/05/13/help-people-consume-your-npm-packages.html):\r\n\r\n> Speaking in terms of object-oriented design, your npm package should be [highly cohesive](https://en.wikipedia.org/wiki/Cohesion_(computer_science)) and [loosely coupled](https://en.wikipedia.org/wiki/Loose_coupling). Your package should do only one thing and do it well.\r\n\r\nCorey Butler also wrote [a nice article](https://medium.com/@goldglovecb/npm-needs-a-personal-trainer-537e0f8859c6) about why it's important to minimize module footprints, including test suite:\r\n\r\n> In the rare situation a developer actually wants to run your test suite on their own local computer, they'll likely clone or fork it.\r\n\r\nAlso see [NPM docs](https://docs.npmjs.com/files/package.json#files) for details about `files` field in `package.json`."},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/185018871","html_url":"https://github.com/less/less.js/pull/2818#issuecomment-185018871","issue_url":"https://api.github.com/repos/less/less.js/issues/2818","id":185018871,"user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T04:38:55Z","updated_at":"2016-02-17T04:38:55Z","body":"Yes.. see the line and comment in the deleted npmignore.\n"}}