Closed michalliu closed 10 years ago
There's a few things you could do:
@@include('/path/to/include/@@filename')
Replacements are processed before includes so this is possible. In your grunt config you could specify filename
as a global variable and set it depending on your condition:
includereplace: {
dist: {
options: {
globals: {
filename: condition ? "consequence.html" : "alternative.html"
}
},
src: '*.html',
dest: 'dist/'
}
}
Thank you
I wish this was supported :/
Because there are valid cases one won't need a separate include but just a different code block.
I want a feature which supports conditional include some tpl, what should i do?