Skip to content
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

Fix npmignore #658

Closed
wants to merge 4 commits into from
Closed

Fix npmignore #658

wants to merge 4 commits into from

Conversation

rxaviers
Copy link
Member

@rxaviers rxaviers commented Dec 14, 2016

I've done several tests and was surprised by the several failed attempts to get files ignored in published package.

  1. Removed the invalid existing .npmignore.
  2. Merged the various .gitignores (from examples) into /.gitignore, but it didn't help. I don't understand why these entries are simply not taken into account by npm (tested v3.9.6 from node 5).
  3. Used negate expressions in package.json files entry worked, although it goes against recommendation:

"The consequences are undefined" if you try to negate any of the files entries (that is, "!foo.js"). Please don't. Use .npmignore.

https://github.com/npm/npm/wiki/Files-and-Ignores#details

PS: By the way, I used tar -tf $(npm pack) to test a publish, a workaround for a dry run.

@rxaviers
Copy link
Member Author

out

rxaviers added a commit to rxaviers/globalize that referenced this pull request Dec 14, 2016
Used negate expressions in package.json files entry, although it goes
against recommendation below, because that's the only thing that
worked.

> "The consequences are undefined" if you try to negate any of the files
> entries (that is, "!foo.js"). Please don't. Use .npmignore.

https://github.com/npm/npm/wiki/Files-and-Ignores#details

Fixes globalizejs#649
Closes globalizejs#658
@rxaviers
Copy link
Member Author

Using this for now, we can revisit this in the future.

Used negate expressions in package.json files entry, although it goes
against recommendation below, because that's the only thing that
worked. Read the github references below for details.

> "The consequences are undefined" if you try to negate any of the files
> entries (that is, "!foo.js"). Please don't. Use .npmignore.

https://github.com/npm/npm/wiki/Files-and-Ignores#details

Fixes globalizejs#649
Closes globalizejs#658
rxaviers added a commit that referenced this pull request Dec 14, 2016
rxaviers added a commit that referenced this pull request Dec 14, 2016
@rxaviers rxaviers closed this in 5d243b8 Dec 14, 2016
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.

1 participant