I've jumped into assemble/Grunt to try and improve my workflow for creating templates for the CMS I use. What I'm trying to figure out: is it possible to use a block/partial of HTML content in my template while developing (ie, during "grunt watch"), but then replace that with the include tag that my CMS requires in the final HTML output (ie when i do "grunt build"). Something like the following?
<div id="content">
{{! if in dev context, include this partial }}
{{#if}}
{{> body }}
{{! if in build context, include this partial }}
{{else}}
{{> body-cms-tag }}
{{/if}}
</div>
which if in dev/watch mode, would output
<div id="content">
<h1>Test Headline</h1>
<p>This is just test content.</p>
</div<
but in build mode, would output
<div id="content">
<?php echo $mContext['bodyElements']; ?>
</div>
Is that possible, either with Handlebars syntax, an Assemble helper, or a Grunt task (similar to grunt-usemin?)