Nonviolent Pirate Mobster
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

metalsmith-discover-helpers

0.1.1 • Public • Published

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

install

npm i metalsmith-discover-helpers

Downloadsweekly downloads

177

version

0.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability