@sparkbox/if-prod
v0.1.1
Published
A hbs helper that renders a block if NODE_ENV is production.
Downloads
7
Readme
ifProd
A hbs helper that renders a block if NODE_ENV=production
.
Usage
Register the partial with handlebars, typically like this:
const hbs = require('handlebars');
const ifProd = require('@sparkbox/if-prod');
hbs.registerHelper('ifProd', ifProd);
Once registered the helper will be available to use in any hbs
file like so:
{{#ifProd}}
<script src="src/prod-script.js"></script>
{{/ifProd}}