Skip to content

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Jun 2, 2021

Our /dist folder contains the executable code in the NPM package. However, since it is ignored in our gitignore, it gets excluded from the NPM package. Adding an empty .npmignore solves this issue by setting itself up as higher precidence than the gitignore for the NPM publish command.

Note: This means other folders such as "coverage" or anything excluded by the .gitignore will also be included in the npm package

Details: https://docs.npmjs.com/cli/v7/using-npm/developers

https://codedotorg.slack.com/archives/C0T0PNR0D/p1622673362009700

@jmkulwik jmkulwik requested review from a team, Hamms, ajpal, epeach and maddiedierker June 2, 2021 23:37
Copy link

@maddiedierker maddiedierker left a comment

Choose a reason for hiding this comment

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

do you know why this wasn't previously an issue? i think it's fine to add an .npmignore, i'm just confused as to why this only came up recently

@jmkulwik
Copy link
Contributor Author

jmkulwik commented Jun 3, 2021

do you know why this wasn't previously an issue? i think it's fine to add an .npmignore, i'm just confused as to why this only came up recently

I don't know why. Molly's published from here recently, so I'm planning to check in with her when she gets back from vacation to see if she's hit similar issues. I'm fine sitting on this PR until after then to see if there's a better way to handle this.

@Hamms
Copy link
Contributor

Hamms commented Jun 3, 2021

This definitely shouldn't be necessary. https://github.com/code-dot-org/redactable-markdown is an example of a repository that gitignores dist and doesn't have an npmignore.

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.

3 participants