-
Notifications
You must be signed in to change notification settings - Fork 52
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
Run "compass" from "watch" through "newer" when '@import'-ed file has changed #55
Comments
I think newer is not suitable for compass in this case; I have only one main file "main.scss" that imports the rest of partials.. Which means I need to "compass" it all the time! |
I also tested it with Assemble and seems not working either; Assemble uses partials and layouts (the same way SASS uses imports) to compile pages.. when I update a partial, the watch task detects the change but "grunt-newer" ignores to run the assemble command because the layout didn't change.. |
👍 |
The documentation mentions an "override" option to check for partials: https://github.com/tschaub/grunt-newer#optionsoverride Unfortunately implementing that |
Just encountered the same problem with Browserify. @jzaefferer According to the docs, The default value for this option is the following. It won't affect anything. function nullOverride(details, include) {
include(false);
} The simplest non-trivial thing is to include all files for the task no matter what. grunt.config('newer', {
options: {
override: function (detail, include) {
if (detail.task == 'browserify') {
include(true);
}
else {
include(false);
}
}
}
}); Of course it is the same as not using You can include some files in every build but still use grunt.config('newer', {
options: {
override: function (detail, include) {
if (detail.task == 'browserify') {
if (detail.path.match('^lib/')) {
include(true);
}
else {
include(false);
}
}
else {
include(false);
}
}
}
}); Important thing to remember is that |
Has anyone come up with a solution for this? I'm trying to use |
Hi there, I just posted something over here, which might be of interest to you. @eush77 @grayghostvisuals @joshdrink @jzaefferer |
All these work arounds seem to just be doing newers job twice (like checking the mtime). Are the changed files not available to just pass into the override method? |
Are we going to enter in 2018 with this feature (bug)? Solution with |
@MonoStas - I think the answer to your question is yes. Unless someone contributes a solution. |
(Unintentionally closed after leaving that comment.) |
in my Grunt file I have:
When I edit a partial *.scss, the "watch" task detects the changes but the "newer" task thinks nothing has changed so it doesn't run the compass on "main.scss".
I have seen an issue here #35 similar but with less.. is there any fix for sass?
The text was updated successfully, but these errors were encountered: