Skip to content
Branch: master
Go to file
Code

Latest commit

timdp committed 0e07b6a Aug 15, 2018

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Nov 3, 2015
Nov 3, 2015
Aug 15, 2018

README.md

metalsmith-discover-helpers

npm Dependencies JavaScript Standard Style

Discovers your template helpers and registers them with Handlebars.

Usage

In metalsmith.json:

{
  "plugins": {
    "metalsmith-discover-helpers": {
      "directory": "helpers",
      "pattern": "/\\.js$/"
    }
  }
}

Using Metalsmith's API:

var discoverHelpers = require('metalsmith-discover-helpers')

require('metalsmith')(__dirname)
  .use(discoverHelpers({
    directory: 'helpers',
    pattern: /\.js$/
  }))
  .build()

The displayed values for directory and pattern are the defaults. If you don't need to change them, you can just leave them out.

Author

Tim De Pauw

License

MIT

About

Discovers your template helpers and registers them with Handlebars.

Resources

License

You can’t perform that action at this time.