gruntjs / grunt-contrib-sass

Compile Sass to CSS.
http://gruntjs.com/
MIT License
848 stars 141 forks source link

Allow dependent file checking. #148

Closed tbremer closed 10 years ago

tbremer commented 10 years ago

This PR allows for this package to work more like the native sass --watch in that when you save a partial file it goes through the source tree and finds files that are dependent on the saved partials (through @import statements).

The option exposed is: checkDependentFiles.

sindresorhus commented 10 years ago

Hmm, not sure about this. It introduces a lot of complexity.

@radkodinev @vladikoff @jmeas thoughts?

I don't want all this code in this module. It could easily be a separate module this plugin just imports. Or it could use an existing one: https://github.com/yarkeev/scss-dependency

radkodinev commented 10 years ago

Yes, seems like too much complexity, at least with all that code inline. IMO such code being required as a separate module is always better.

I also personally find the code style too different from the one used in this (and other) grunt plugins.

tbremer commented 10 years ago

I can understand wanting the code to be a separate module, had it occurred to me I would have gone that route.

@radkodinev could you speak more to the style issues? I am just curious so if / when I submit PR further down the road I could be in keeping with you're patterns.

@sindresorhus is it worth my time to look at the other module, is this idea something you would pull into this plugin?

Thanks!

tbremer commented 10 years ago

@sindresorhus, @radkodinev got back to this after a couple meetings today. The scss-dependency plugin work opposite of my idea, it takes non partials and returns what partials are imported.

I will gladly move my functionality into a new node-module if you think this is something you will fold into the plugin.

I find compiling based on partial dependencies to be a really great feature that comes up quite often in my workflows.

radkodinev commented 10 years ago

@tbremer I have sent you an email regarding code style to avoid further cluttering the discussion here on that topic.

tbremer commented 10 years ago

@radkodinev Thanks for the email! It was super helpful!

tbremer commented 10 years ago

I have started work on a node module and will be submitting a PR for that soon.