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

Adds the ability to specify an excludeFiles glob #471

Merged
merged 4 commits into from
Apr 21, 2019

Conversation

designfrontier
Copy link
Contributor

@designfrontier designfrontier commented Jan 5, 2019

What did you implement:

Closes #433

How did you implement it:

Fairly trivial, just used the ignore option in glob to exclude files matching the glob.

How can we verify it:

  1. Setup a serverless project with an index.test.js and an index.js that handle a route
  2. Start it up and see that you get a warning about duplicate files matching for index
  3. Now pull in this PR
  4. add the following to your serverless.yml file in the custom > webpack section
    excludeFiles: **/*.test.js
  5. restart serverless
  6. see that the warnings are now gone!

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

1. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the PR
2. Please follow the template, otherwise we'll have to ask you to update it and it will take longer until your PR is merged
-->

Closes serverless-heaven#433

<!--
Briefly describe the feature if no issue exists for this PR. If possible only
submit PRs for existing issues. If the PR is trivial (like doc changes or simple
code fixes) it can be submitted without a related issue, but as soon as it adds
or changes functionality, a related issue should be present.
-->

Fairly trivial, just used the ignore option in glob to exclude files matching the glob.

1. Setup a serverless project with an index.test.js and an index.js that handle a route
2. Start it up and see that you get a warning about duplicate files matching for index
3. Now pull in this PR
4. add the following to your serverless.yml file in the custom > webpack section
`excludeFiles: **/*.test.js`
5. restart serverless
6. see that the warnings are now gone!

- [x] Write tests
- [ ] Write documentation
- [x] Fix linting errors
- [x] Make sure code coverage hasn't dropped
- [x] Provide verification config / commands / resources
- [x] Enable "Allow edits from maintainers" for this PR
- [x] Update the messages below

***Is this ready for review?:*** YES
***Is it a breaking change?:*** NO
@designfrontier
Copy link
Contributor Author

Looking for suggestions on which section of the documentation notes should be added to...

@designfrontier
Copy link
Contributor Author

Added documentation in the best place that I could find

@designfrontier
Copy link
Contributor Author

@HyperBrain any thoughts on this?

@Clement134
Copy link

@HyperBrain this issue looks relatively simple to test and could not introduce breaking changes.
It is possible to merge it?

@designfrontier designfrontier requested a review from a team April 7, 2019 18:39
@designfrontier
Copy link
Contributor Author

@serverless-heaven/serverless-webpack-team Would love to have someone other than me sign off on this.

@rmngrc
Copy link

rmngrc commented Apr 8, 2019

Would love to get this merged too 👍

@hassankhan
Copy link
Contributor

@designfrontier Will try my best to give it a whirl this week and report back 👍

@hassankhan
Copy link
Contributor

Had a chance to run it against my project, all the errors are now gone 👍 Thanks @designfrontier!

@HyperBrain HyperBrain added this to the 5.3.0 milestone Apr 21, 2019
@HyperBrain HyperBrain merged commit 961ad25 into serverless-heaven:master Apr 21, 2019
@HyperBrain HyperBrain mentioned this pull request Apr 30, 2019
@HyperBrain
Copy link
Member

Released with 5.3.0

jamesmbourne pushed a commit to jamesmbourne/serverless-webpack that referenced this pull request Oct 15, 2019
…arning

Adds the ability to specify an excludeFiles glob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to exclude files from handler lookup
5 participants