helper-process

0.1.0 • Public • Published

helper-process NPM version

{{process}} handlebars helper for processing raw templates in included content, with the correct context.

Quickstart

Install the helper with: npm install handlebars-helper-process --save

Usage with Assemble

If you use Assemble and Grunt, you have some simple options for adding helpers.

Option #1

Add handlebars-helper-process to the helpers property in the Assemble task or target options in your Gruntfile:

grunt.initConfig({
  assemble: {
    options: {
      // You may either register the helper this way.
      helpers: ['handlebars-helper-process', 'foo/*.js']
    },
    files: {}
  }
});

Option #2

Or, add the handlebars-helper-process module to both the devDependencies and the keywords array of your project's the package.json, enabling Assemble will automatically resolve the helper. Example:

{
  "name": "your-project",
  "dependencies": {
    "handlebars-helper-process": "*"
  },
  "keywords": [
    "handlebars-helper-process"
  ]
}

With that completed, you may now use the {{#process}} helper in your templates:

{{#each pages}}
  {{#isnt basename 'index'}}
    {{#process}}
      {{{page}}}
    {{/process}}
  {{/isnt}}
{{/each}}

Please report any bugs or feature requests, thanks!

Contributing

Please see the Contributing to helper-process guide for information on contributing to this project.

Author

Jon Schlinkert

License

Copyright (c) 2013 Jon Schlinkert Released under the MIT license


This file was generated on Wednesday, November 6, 2013.

Package Sidebar

Install

npm i helper-process

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • doowb
  • jonschlinkert