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

.npmignore and files are ignored in favor of .gitignore #2986

Closed
TrySound opened this issue Mar 24, 2017 · 5 comments
Closed

.npmignore and files are ignored in favor of .gitignore #2986

TrySound opened this issue Mar 24, 2017 · 5 comments

Comments

@TrySound
Copy link

Do you want to request a feature or report a bug?

Bug

Dup #685 and #754 of just to draw attention because yarn publish command is unusable now.

What is the current behavior?

yarn pack looks in .gitignore to skip files even if .npmignore (not so matter caz npm specific) or files field are present.

What is the expected behavior?

prefer files field over .gitignore

Please mention your node.js, yarn and operating system version.

yarn0.21.3, node6

@wclr
Copy link
Contributor

wclr commented Apr 14, 2017

Yes, should not consider .gitignore if there is .npmignore/.yarnignre in place, seem to be kind of broken behaviour.

@bestander

@arcanis
Copy link
Member

arcanis commented Apr 28, 2017

Closing this one, since it's a dupe.

@arcanis arcanis closed this as completed Apr 28, 2017
@srghma
Copy link

srghma commented Sep 24, 2017

For everyone who came here, because your directories with compiled js files were not published because they were in gitignore

use this .npmignore

# ignore everything
/*

# except
!es
!lib

@korneel
Copy link

korneel commented Sep 28, 2017

@BjornMelgaard Thanks, I had to use !lib/*.

@jonaskello
Copy link

@BjornMelgaard @korneel Thanks for leaving these notes here. I had to do this to make it work:

# ignore everything
*/**

# except
!lib-cjs/**/*
!lib-esm/**/*

moretti added a commit to marvelapp/react-ab-test that referenced this issue Apr 9, 2018
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

No branches or pull requests

6 participants