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
Ability to not overwrite config of a task #36
base: master
Are you sure you want to change the base?
Conversation
I Propose to add the ability to not overwrite config of a task. There are a tasks like `grunticon` witch need original config (with all files) to work right - so `grunt-newer` will run full task if any file will change. To ignore changing config (line 120) need to add in never task options `changeConfig: false`. You can specify `changeConfig` to all task, or to single taks: ``` newer: { options: { cache: 'app/cache/grunt', changeConfig: false } } ``` or ``` newer: { options: { cache: 'app/cache/grunt', grunticon: { changeConfig: false } } } ```
The way this is implemented, it looks like it would have the same effect as not prefixing your The point of overwriting the config is so a task works with a limited set of files (only those that are newer). If you don't modify the config, the Can you give an example of your |
I known what is
In Example grunticon task
|
+1 @kfiku I'm interested in this functionality as well. I'm taking a look at your patch to see if it solves my problem as well. thanks! |
@mattkime we are blocked by @tschaub. I think @tschaub don't see a lot of use cases where this feature can be grate. Also grate can be somethink like hybrid with grunt-never and https://github.com/rse/grunt-newer-explicit |
If However, with the above configuration, because Previously (@v0.5.4) there was an |
@tschaub I see you still don't understand how grunticon works and how my commit allow newer works with it. So again:
You say: |
I believe the options.override feature solves this general problem. move to close this pr but i wanted to give @kfiku a heads up |
@@ -40,6 +40,26 @@ function createTask(grunt) { | |||
var options = this.options({ | |||
cache: path.join(__dirname, '..', '.cache') | |||
}); | |||
|
|||
if(options[taskName]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea
I Propose to add the ability to not overwrite config of a task.
There are a tasks like
grunticon
witch need original config (with all files) to work right - sogrunt-newer
will run full task if any file will change.To ignore changing config (line 120) need to add in never task options
changeConfig: false
.You can specify
changeConfig
to all task, or to single taks:or