ngannotate-rails icon indicating copy to clipboard operation
ngannotate-rails copied to clipboard

Allow a specific path or paths under ignore_paths?

Open ajbogh opened this issue 8 years ago • 1 comments

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/**/*'
]

ajbogh avatar Mar 27 '17 19:03 ajbogh

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.

kikonen avatar Mar 28 '17 07:03 kikonen