pucelle / vscode-run-on-save

Run configured shell commands when a file is saved in vscode, and output configured messages on status bar.
https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
MIT License
51 stars 14 forks source link

Supports Glob Expressions #9

Closed pucelle closed 4 years ago

pucelle commented 4 years ago

I suppose glob expression like *.scss would be easier to write and understand compare to current regular expression like .+?\.scss. So it would be great to support glob expression.

BitFis commented 4 years ago

Think is a good idea, how would you differentiate between it beeing glob and regex?

BitFis commented 4 years ago

I had a look around and thought we could do it in the mozilla style;

Regex identified, if there is the pattern: "match": "/{pattern}/{flags}", if this pattern does not occure, we could suspect the glob expression is preferred. What do you think?

pucelle commented 4 years ago

Just add a new option like globMatch, a globNotMatch may be need or not because glob expression already support to exclude rules inside one expression.

It's fine to just leave this issue here because it's just my idea, nobody have gave any feedback.

BitFis commented 4 years ago

True, that would keep the implementation simple.

Sure thing :+1:, just loved the idea aswell :grin: