-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
'yarn pack' should not process .gitignore if .npmignore is present #754
Comments
Seems related to #685 |
Appears so except This issue needs But then it's not clear if npm honoring |
|
oy. I wasn't expecting that. Likely npm started ignoring files in I'll retitle this issue again. |
(Typing this out here as future reference or for anyone willing to take this up) What the problem here seems to be is that Afterwards Some (basic) possible solutions for this are:
Note that you need to keep the iteration and check all directories, as deeper directory ignore files overrule higher ones. |
I'd just do the following:
|
Yes @donpark! A bit the way I had in mind with the second one, but I quickly listed thought-flows around the problem, trying to help/kickstart possible future readers. Yours absolutely makes more sense, and would possible solve any complexities with higher/deeper listed ignore files as-well. Thanks for chipping in! |
It's quite surprising, are you saying that an empty That is what I expect since it's what npm does... |
I had the problem of yarn ignoring my output folder when publishing because it was in .gitignore, and creating an empty .npmignore fixed it. yarn 1.12.3 |
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
yarn pack
ignores files specified in.gitignore
whilenpm pack
does not.When
.js
files are generated from another language or flavor of javascript, generated files are often not checked-in and thus*.js
or**/*.js
entry is added to.gitignore
. These generated files should be included in the package at runtime.If the current behavior is a bug, please provide the steps to reproduce.
index.js
file at project root..gitignore
file at project root with entry*.js
.yarn pack
..tgz
file.index.js
file will not be in the decompressed package, onlypackage.json
andnode_modules
.What is the expected behavior?
index.js
should be there.Please mention your node.js, yarn and operating system version.
Node.js v6.7
Yarn v0.15.1
macOS Sierra
The text was updated successfully, but these errors were encountered: