Search code examples
typescriptunixkarma-runnerglob

Globbing pattern to include all files in the intermediate folder


I'm configuring typescript/karma and I need to match all files inside a directory using globbing pattern.

Suppose I have the following directory structure:

src
  webapp
     core
     ext
     libs

So now I want to match all files in the libs folder without specifying full path to the folder. Is this the correct globbing pattern:

**/webapp/libs/**

This is for typescript configuration:

The "files" property takes a list of relative or absolute file paths. The "include" and "exclude" properties take a list of glob-like file patterns. The supported glob wildcards are:

  • matches zero or more characters (excluding directory separators) ? matches any one character (excluding directory separators) **/ recursively matches any subdirectory

Solution

  • There is no "webapp" in your directory structure :) Maybe you want something like this?

    $ find . -wholename "**/web/libs/*"
    ./src2/web/libs/t
    ./src2/web/libs/tt
    ./src/web/libs/ttt