Closed rschick closed 6 years ago
Updated with support for function-level includes.
I moved the include list into custom options, so existing deployments won't be affected. Also allows you to include globs in the package that are not scanned for dependencies.
For example, in my project I'm using:
custom:
includeDependencies:
always:
- 'api/**'
package:
individually: true
exclude:
- '**/*'
include:
- 'public/**' # don't want this scanned for dependencies
(edit: I went with always
, and remove the redundant include)
Nice! I wonder if we could avoid the repeated include
directive in package (let this plugin add it for you)?
I also wonder if 'include' could be named better. like includeDependencies: always: or explicit or local .. or maybe include is fine.
I incorporated your feedback - what do you think?
Just the one bug with .package!
These are the changes I was thinking about, to go through the includes and find dependencies which might not be statically required.
In my project this adds a fair amount of processing time, so I'm thinking we should probably have a default-off option to enable this.