JaimeGensler / thyseus

An archetypal Entity Component System, built entirely in Typescript
MIT License
74 stars 3 forks source link

Accept a list of minimatch patterns for include/exclude #52

Closed 3mcd closed 1 year ago

3mcd commented 1 year ago

The createFilter function from @rollup/pluginutils uses minimatch under the hood. minimatch.match supports both a string and an array of patterns thus we should accept both in the plugin's include and exclude options, e.g:

{
  plugins: [
    thyseus({
      include: ['./example/**', './src/**'],
    }),
  ]
}

See also: https://rollupjs.org/plugin-development/#transformers

JaimeGensler commented 1 year ago

Nice catch, thank you!