tomusdrw / grunt-sync

[Not actively developed] Grunt.js task providing one-way synchronization of directories. Instead of copying all files only those that has been changed are copied which actually results in much faster execution.
MIT License
77 stars 19 forks source link

Question about exclusion (!) syntax #59

Closed sffc closed 6 years ago

sffc commented 6 years ago

I was trying to find where it is implemented in the code, but unless I'm missing something obvious I can't find it:

https://github.com/tomusdrw/grunt-sync/blob/master/tasks/sync.js

A few questions about it:

  1. Where did the idea for using ! originate (rather than some other syntax for doing exclusion patterns)?
  2. Where is it implemented in grunt-sync?
  3. Are you aware of any other projects using this syntax?

The reason I'm asking is because I'm working on an inclusion/exclusion engine for ICU, and I was intrigued by the idea of using ! for exclusion patterns and want to understand more of the history, particularly the degree to which this syntax is a convention.

tomusdrw commented 6 years ago

Hi @sffc, the pattern is blindly forwarded to https://github.com/isaacs/node-glob#glob-primer The syntax is actually what they do support, so better direct the question to glob maintainers.

sffc commented 6 years ago

Got it, it's just from Glob directly. Thanks for the pointer!