tschaub / grunt-newer

Configure Grunt tasks to run with newer files only.
https://npmjs.org/package/grunt-newer
MIT License
945 stars 61 forks source link

Adding changed files to the override method in order to support partials change #71

Open yonidor opened 9 years ago

yonidor commented 9 years ago

I'm working with a large codebase of sass files, where some files @import other partial files. When a partial file changes, I would like to be able to compile all of its dependencies (files that @import it), using a watch and a newer:sass tasks.

I thought the override function will allow me to to the following pseudo code:

foreach changed file
   if file is partial
      get all non-changed files that import the partial file
      include these files for the task

But the list of changed files is not available in the override function.

Instead, with current implementation, i need to go over all of the non-changed files, extract all of their @imprort-ed files, and check if the partial file has been changed lately, and only then i can decide if the file should be included or not. that is very inefficient.

I wonder if it possible to pass the list of changed files to the override function.

ghost commented 8 years ago

See if my comment here matches what you're seeing/wanting.

https://github.com/tschaub/grunt-newer/issues/37#issuecomment-137260795

tfrommen commented 8 years ago

Hi there,

I just posted something over here, which might be of interest to you.

@killerspaz @yonidor