Skip to content

Move npmignore blacklist to package.json whitelist #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

andrewimm
Copy link
Contributor

Replaces blacklisting with whitelisting, to specify which files go up to npm to be installed by users.
This prevents .babelrc and other build configurations from being shipped to users, making it less likely that their build processes break (the RN packager in particular dislikes this).

"files": [
"bin/",
"lib/",
"src/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why would we want src/ here, since it's non-compiled version of lib.

@andrewimm
Copy link
Contributor Author

This is an unfortunate tradeoff. If you want to still use the npm prepackage script, you'll need to include src. Otherwise, you'll have be responsible for ensuring that the package has been built before publishing. I'm looking into ways we can trick babel into no-op-ing to avoid shipping src as well

@nlutsenko
Copy link
Contributor

👍 Sounds good, lgtm otherwise.

@andrewimm
Copy link
Contributor Author

Actually, let's try removing the src directory and just see what breaks :) It might work.

@nlutsenko nlutsenko assigned andrewimm and unassigned nlutsenko Feb 24, 2016
@lacker
Copy link
Contributor

lacker commented Feb 24, 2016

I am officially excited to see this pull request

@facebook-github-bot
Copy link

@andrewimm updated the pull request.

nlutsenko added a commit that referenced this pull request Feb 24, 2016
Move npmignore blacklist to package.json whitelist
@nlutsenko nlutsenko merged commit 970682a into master Feb 24, 2016
@nlutsenko nlutsenko deleted the andrewi.ship_less branch February 24, 2016 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants