ngannotate-rails
ngannotate-rails copied to clipboard
Allow a specific path or paths under ignore_paths?
Is there a way to allow a specific path, such as /vendor/assets/javascripts/myCustomPath/, to be annotated while preventing the system from processing any other files under /vendor/?
In the documentation and code it looks like the ignore_paths option completely overrides paths.
It would be nice if this were more of a glob pattern system like Javascript uses. For example, the following will exclude all of vendorexcept it could include certain assets:
config.ng_annotate.paths = [
'!/vendor/**/*',
'/vendor/assets/javascripts/myCustomPath/**/*'
]
Values in both ignore and include path lists can be [String | Regexp | Proc]. So I would suggest trying either Regexp or Proc to accomplish this.