Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically determine appropriate rules without the need for exclude #6

Open
CoolOppo opened this issue Mar 3, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@CoolOppo
Copy link
Owner

CoolOppo commented Mar 3, 2019

Let's say you have the following rules:

[minify]
from = '(?P<name>.*)\.js$'
to = '$name.min.js'
exclude = '\.min\.js$'
command = 'cp $i $o'

[gzip]
from = '(?P<name>.*)\.min\.js$'
to = '$name.min.js.gz'
command = 'zopfli $i'

Without the exclude property, the minify rule will run on its own output files as well. It shouldn't be required in this situation because the program can automatically determine that the .min.js file was generated by that rule, but this situation is not accounted for at the moment.

@CoolOppo CoolOppo added the enhancement New feature or request label Mar 3, 2019
@CoolOppo
Copy link
Owner Author

CoolOppo commented Mar 3, 2019

I'm thinking the way to fix this is to make a struct and store the rule that generated the file along with the file. The rule is also stored in the graph edge pointing to the file as well though, so that might be the real way to go.

@CoolOppo CoolOppo added the help wanted Extra attention is needed label Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant