Closed Grawl closed 10 years ago
+1 same problem here
I just find a working solution into someone's gruntfile.coffee#105 on Github. it's simple as 1,2,3: if detail.task is 'jade
then include true
. and it works.
so just add this code below to your gruntfile before watch
newer:
options:
override: (detail, include) ->
if detail.task is 'jade'
include true
else
include false
you're awesome developer now!
@Grawl include true seems to have the same result of compiling everything for me. For me I was looking for a sass solution so I did:
.... if (detail.task === 'sass') include(true); else include(false);
and this resulted in compiling all my scss files instead of just my imports. I think you have to define your own function.
It works for me:
module.exports = {
jade: {
files: ['app/views/pages/{,*/}*.jade'],
tasks: ['newer:jade:server'],
options: {
event: 'changed'
}
}
};
+1
I am using
newer
withcontrib-jade
and modified imports does not triggers parent template compile.template.jade
modules/sub.jade
And when I change
sub.jade
I want to compiletemplate.jade
but watcher do not do it. Same problem withinclude
. Maybe a problem is in my gruntfile config?I tried to use
override
function but getFatal error: checkForModifiedImports is not defined
on this. IscheckForModifiedImports
are example function name that I need to write on my own?My gruntfile: https://gist.github.com/Grawl/0eef67b20a40ec97ace