Skip to content

feat: static option glob support#124

Merged
shellscape merged 5 commits intomasterfrom
feat/static-glob
Apr 9, 2019
Merged

feat: static option glob support#124
shellscape merged 5 commits intomasterfrom
feat/static-glob

Conversation

@shellscape
Copy link
Owner

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

Please Describe Your Changes

This PR adds functionality to the static option whereby it will use globby to derive a list of files to serve as static. @ndelangen had asked if this was possible, in order to run multiple instances of WPS in separate processes off of the same directory. Using globs, users can get very specific about which files/directories they want served.

This still needs vetting, as I believe that koa-static will only serve files based on a directory, rather than the file path itself, but that needs verification. Note that it is next to impossible to get the koa maintainers to add to existing core plugins/middleware. If it holds as not possible to specify files, we'll have to fork and provide that.

@shellscape
Copy link
Owner Author

I was able to confirm that koa-static doesn't allow specifying individual files. Works on a directory-level basis only. I'm not sure that's a blocker, but something to keep in mind moving forward.

@shellscape shellscape merged commit fa20f5f into master Apr 9, 2019
@shellscape shellscape deleted the feat/static-glob branch April 9, 2019 16:25
smashercosmo pushed a commit to smashercosmo/webpack-plugin-serve that referenced this pull request Jul 23, 2019
* feat: static option glob support

* test: fix test paths for local and CI

* docs: add clarity, link to recipe to static option

* chore: update test snapshot file
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.

3 participants