GitHub user azylman opened a pull request:
https://github.com/apache/thrift/pull/741
THRIFT-3485 don't publish extra files to npm
The thrift npm package is as big as all of our other node dependencies
combined. It currently publishes the entire thrift repository, which is ~30mb
right now. As far as I can tell, it only requires lib/nodejs, which is 376k.
I propose adding an .npmignore file. You can more info in the npm
documentation:
https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
If the package only requires lib/nodejs, we should be able to add an entry
to the npmignore file for every folder (including lib), and then a negated
entry for lib/nodejs. We'll also want to include everything from gitignore,
because npm will no longer use that once an npmignore file is added.
I've tested this using the method recommended in the npmjs documented,
basically installing the package globally and making sure it still requires
successfully:
```
$ npm install -g .
$ node
> var thrift = require('thrift');
undefined
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/azylman/thrift THRIFT-3485
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/741.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #741
----
commit 93ed364c0f7a31423ef7b5daa2272777ad001b9f
Author: Alex Zylman <[email protected]>
Date: 2015-12-11T02:44:14Z
THRIFT-3485 don't publish extra files to npm
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---