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

Ignore .spec.ts files when compiling #220

Merged
merged 1 commit into from
Mar 1, 2020

Conversation

jonchurch
Copy link
Member

Relates to #219

Assuming the .spec.ts file are not intended to be part of the distribution, they should be ignored when compiling.

@jonchurch
Copy link
Member Author

jonchurch commented Feb 29, 2020

To be clear, it looks like the problem is that we are publishing the spec file.

This can also be solved in a different way, where test files are in a specific test folder, which is not included in the files list that is published to npm. After a lot of testing this single line change seems the most elegant.

Copy link
Member

@blakeembrey blakeembrey left a comment

Choose a reason for hiding this comment

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

Thanks @jonchurch!

@blakeembrey
Copy link
Member

Dumb question, but can we use the NPM config to ignore these files? Last I recall you couldn't combine .npmignore with files, or put negations in files, but those would be a tiny bit nicer.

@jonchurch
Copy link
Member Author

jonchurch commented Feb 29, 2020

An .npmignore does work, ala dist*/*.spec.*, but then it overrides anything in .gitignore when it comes to publishing.

Since the package is whitelisting with the files field of package.json, it's less of a concern, but still something to keep in mind.

Grrr, I've written, rewritten, and deleted this comment several times now. I'm not having any luck actually with .gitignore or .npmignore.

@blakeembrey
Copy link
Member

@jonchurch Thanks for exploring! Sorry to put you through that. Let's merge and we can release as is.

@blakeembrey blakeembrey merged commit 0c466b1 into pillarjs:master Mar 1, 2020
@jonchurch
Copy link
Member Author

Thanks to @StephenTangCook for asking the question!

@blakeembrey
Copy link
Member

We may need to revert this or do additional work. I realized the other week that by excluding these files, it’s not actually using the right settings for type checking. Not a problem right now, but we should probably have a specific build config instead of changing this one.

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.

None yet

2 participants