@sparkbox/if-prod

0.1.1 • Public • Published

ifProd

CircleCI

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}}

Readme

Keywords

Package Sidebar

Install

npm i @sparkbox/if-prod

Weekly Downloads

1

Version

0.1.1

License

ISC

Last publish

Collaborators

  • jon-sbx
  • catheraaine
  • kaseybon
  • flotsam