{"id":14957672,"url":"https://github.com/shannonmoeller/handlebars-wax","last_synced_at":"2026-04-14T13:01:31.301Z","repository":{"id":25230801,"uuid":"28655250","full_name":"shannonmoeller/handlebars-wax","owner":"shannonmoeller","description":"The missing Handlebars API for data, partials, helpers, and decorators.","archived":false,"fork":false,"pushed_at":"2018-03-03T18:24:15.000Z","size":157,"stargazers_count":41,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-13T18:48:27.199Z","etag":null,"topics":["data","decorators","expressjs","glob","handlebars","helpers","nodejs","partials"],"latest_commit_sha":null,"homepage":"http://npm.im/handlebars-wax","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shannonmoeller.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-31T03:58:44.000Z","updated_at":"2025-04-20T06:27:40.000Z","dependencies_parsed_at":"2022-08-25T01:40:50.648Z","dependency_job_id":null,"html_url":"https://github.com/shannonmoeller/handlebars-wax","commit_stats":null,"previous_names":["shannonmoeller/handlebars-registrar","shannonmoeller/handlebars-glob"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/shannonmoeller/handlebars-wax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannonmoeller%2Fhandlebars-wax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannonmoeller%2Fhandlebars-wax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannonmoeller%2Fhandlebars-wax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannonmoeller%2Fhandlebars-wax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shannonmoeller","download_url":"https://codeload.github.com/shannonmoeller/handlebars-wax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannonmoeller%2Fhandlebars-wax/sbom","scorecard":{"id":816090,"data":{"date":"2025-08-11","repo":{"name":"github.com/shannonmoeller/handlebars-wax","commit":"cbc6d9d7c6ee5f529b97c942ec3ff2e321a6854c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":0,"reason":"96 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-8w4h-3cm3-2pm2","Warn: Project is vulnerable to: GHSA-42xw-2xvc-qx8m","Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-p9w8-2mpq-49h9","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-h726-x36v-rx45","Warn: Project is vulnerable to: GHSA-779f-wgxg-qr8f","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-jv35-xqg7-f92r","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T14:18:10.324Z","repository_id":25230801,"created_at":"2025-08-23T14:18:10.324Z","updated_at":"2025-08-23T14:18:10.324Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31797376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","decorators","expressjs","glob","handlebars","helpers","nodejs","partials"],"created_at":"2024-09-24T13:15:19.292Z","updated_at":"2026-04-14T13:01:31.261Z","avatar_url":"https://github.com/shannonmoeller.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `handlebars-wax`\n\n[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url] [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Tip][amazon-img]][amazon-url]\n\nThe missing Handlebars API. Effortless registration of data, partials, helpers, and decorators using file-system globs, modules, and plain-old JavaScript objects.\n\n## Install\n\n    $ npm install --save handlebars-wax\n\n## Usage\n\n```\n┣━ index.js\n┣━ data/\n┃  ┣━ site.js\n┃  ┗━ locale.json\n┣━ decorators/\n┃  ┣━ currency.js\n┃  ┗━ i18n.js\n┣━ helpers/\n┃  ┣━ link.js\n┃  ┗━ list.js\n┗━ partials/\n   ┣━ footer.js\n   ┗━ header.hbs\n```\n\n```js\nvar handlebars = require('handlebars');\nvar handlebarsWax = require('handlebars-wax');\n\nvar wax = handlebarsWax(handlebars)\n\n    // Partials\n    .partials('./partials/**/*.{hbs,js}')\n    .partials({\n        boo: '{{#each boo}}{{greet}}{{/each}}',\n        far: '{{#each far}}{{length}}{{/each}}'\n    })\n\n    // Helpers\n    .helpers(require('handlebars-layouts'))\n    .helpers('./helpers/**/*.js')\n    .helpers({\n        foo: function () { ... },\n        bar: function () { ... }\n    })\n\n    // Decorators\n    .decorators('./decorators/**/*.js')\n    .decorators({\n        baz: function () { ... },\n        qux: function () { ... }\n    })\n\n    // Data\n    .data('./data/**/*.{js,json}')\n    .data({\n        lorem: 'dolor',\n        ipsum: 'sit amet'\n    });\n\nconsole.log(handlebars.partials);\n// { footer: fn(), header: fn(), boo: fn(), far: fn() }\n\nconsole.log(handlebars.helpers);\n// { link: fn(), list: fn(), foo: fn(), bar: fn(), extend: fn(), ... }\n\nconsole.log(handlebars.decorators);\n// { currency: fn(), i18n: fn(), baz: fn(), bat: fn() }\n\nconsole.log(wax.context);\n// { site: { ... }, locale: { ... }, lorem: 'dolor', ipsum: 'sit amet' }\n\nvar template = wax.compile('{{lorem}} {{ipsum}}');\n\nconsole.log(template({ ipsum: 'consectetur' }));\n// \"dolor consectetur\"\n```\n\n## Registering Partials, Helpers, and Decorators\n\nYou may use `handlebars-wax` to require and register any modules that export a `register` factory, an object, or a function as partials, helpers, and decorators.\n\n### Exporting a Factory\n\nIn cases where a direct reference to the instance of Handlebars in use is needed, modules may export a `register` factory function. For example, the following module will define a new helper called `foo-bar`:\n\n```js\nmodule.exports.register = function (handlebars) {\n    handlebars.registerHelper('foo-bar', function (text, url) {\n        var result = '\u003ca href=\"' + url + '\"\u003e' + text + '\u003c/a\u003e';\n\n        return new handlebars.SafeString(result);\n    });\n};\n```\n\n### Exporting an Object\n\nIf a module exports an object, that object is registered with Handlebars directly where the object keys are used as names. For example, the following module exports an object that will cause `baz` and `qux` to be registered:\n\n```js\nmodule.exports = {\n    baz: function () {\n        // do something\n    },\n    qux: function () {\n        // do something\n    }\n};\n```\n\n### Exporting a Function\n\nIf a module exports a function, that function is registered based on the globbed portion of a path, ignoring extensions. Handlebars' `require.extensions` hook may be used to load `.handlebars` or `.hbs` files as precompiled template functions.\n\n```js\nmodule.exports = function () {\n    // do something\n};\n```\n\n```\n┣━ index.js\n┗━ partials/\n   ┣━ components\n   ┃  ┣━ link.js\n   ┃  ┗━ list.js\n   ┗━ layouts\n      ┣━ one-column.hbs\n      ┗━ two-column.hbs\n```\n\n```js\nhandlebarsWax(handlebars)\n    .partials('./partials/**/*.{hbs,js}');\n    // registers the partials:\n    // - `components/link`\n    // - `components/list`\n    // - `layouts/one-column`\n    // - `layouts/two-column`\n\nhandlebarsWax(handlebars)\n    .partials('./partials/components/*.js')\n    .partials('./partials/layouts/*.hbs');\n    // registers the partials:\n    // - `link`\n    // - `list`\n    // - `one-column`\n    // - `two-column`\n\nhandlebarsWax(handlebars)\n    .partials([\n        './partials/**/*.{hbs,js}',\n        '!./partials/layouts/**'\n    ])\n    .partials('./partials/layouts/*.hbs');\n    // registers the partials:\n    // - `components/link`\n    // - `components/list`\n    // - `one-column`\n    // - `two-column`\n```\n\nHelpers and decorators are handled similarly to partials, but path separators and non-word characters are replaced with hyphens to avoid having to use [segment-literal notation][square] inside templates.\n\n```\n┣━ index.js\n┗━ helpers/\n   ┣━ format\n   ┃  ┣━ date.js\n   ┃  ┗━ number.round.js\n   ┗━ list\n      ┣━ group-by.js\n      ┗━ order-by.js\n```\n\n```js\nhandlebarsWax(handlebars)\n    .helpers('./helpers/**/*.js');\n    // registers the helpers:\n    // - `format-date`\n    // - `format-number-round`\n    // - `list-group-by`\n    // - `list-order-by`\n```\n\n### Custom Names\n\nYou may customize how names are generated by using the `base` option, or by specifying a custom `parsePartialName`, `parseHelperName`, or `parseDecoratorName` function.\n\n\n```js\nhandlebarsWax(handlebars)\n    .partials('./partials/components/*.js', {\n        base: __dirname\n    })\n    .partials('./partials/layouts/*.hbs', {\n        base: path.join(__dirname, 'partials/layouts')\n    });\n    // registers the partials:\n    // - `partials/components/link`\n    // - `partials/components/list`\n    // - `one-column`\n    // - `two-column`\n\nhandlebarsWax(handlebars)\n    .helpers('./helpers/**/*.{hbs,js}', {\n        // Expect these helpers to export their own name.\n        parseHelperName: function(options, file) {\n            // options.handlebars\n            // file.cwd\n            // file.base\n            // file.path\n            // file.exports\n\n            return file.exports.name;\n        }\n    });\n    // registers the helpers:\n    // - `date`\n    // - `round`\n    // - `groupBy`\n    // - `orderBy`\n```\n\n## Registering Data\n\nWhen data is registered, the resulting object structure is determined according to the default rules of [`require-glob`][reqglob].\n\n```\n┣━ index.js\n┗━ data/\n   ┣━ foo/\n   ┃  ┣━ hello.js\n   ┃  ┗━ world.json\n   ┗━ bar/\n      ┣━ bye.js\n      ┗━ moon.json\n```\n\n```js\nhandlebarsWax(handlebars)\n    .data('./data/**/*.{js,json}');\n    // registers the data:\n    // {\n    //     foo: {\n    //         hello: require('./data/foo/hello.js'),\n    //         world: require('./data/foo/world.json')\n    //     },\n    //     bar: {\n    //         hello: require('./data/bar/bye.js'),\n    //         world: require('./data/bar/moon.json')\n    //     }\n    // }\n```\n\n### Custom Keys\n\nYou may customize how data is structured by using the `base` option, or by specifying a custom `parseDataName`.\n\n```js\nhandlebarsWax(handlebars)\n    .data('./data/**/*.{js,json}', {\n        base: __dirname,\n        parseDataName: function(options, file) {\n            // options.handlebars\n            // file.cwd\n            // file.base\n            // file.path\n            // file.exports\n\n            return file.path\n                .replace(file.base, '')\n                .split(/[\\/\\.]/)\n                .filter(Boolean)\n                .reverse()\n                .join('_')\n                .toUpperCase();\n        }\n    });\n    // registers the data:\n    // {\n    //     JS_HELLO_FOO_DATA: require('./data/foo/hello.js'),\n    //     JSON_WORLD_FOO_DATA: require('./data/foo/world.json'),\n    //     JS_BYE_BAR_DATA: require('./data/bar/bye.js'),\n    //     JSON_MOON_BAR_DATA: require('./data/bar/moon.json')\n    // }\n```\n\n## Context and Rendering\n\nTemplates that are compiled by `handlebars-wax` are passed a merged object of pre-registered (global) data and template (local) data as the context. This means accessing data will generally Just Work™.\n\n```js\nvar template = wax.compile('{{foo}} {{bar}} {{baz}}');\n\nwax.data({ foo: 'hello', bar: 'world' });\n\nconsole.log(template({});\n// \"hello world \"\n\nconsole.log(template({ bar: 'moon', baz: 'pluto' });\n// \"hello moon pluto\"\n```\n\nIn cases where local variable names conflict with global variables, each context may be accessed directly using the special `@global` and `@local` variables.\n\n```js\nvar template = wax.compile('{{@global.foo}} {{@local.foo}} {{foo}}');\n\nwax.data({ foo: 'jupiter' });\n\nconsole.log(template({ foo: 'mars' });\n// \"jupiter mars mars\"\n```\n\n## API\n\n### handlebarsWax(handlebars [, options]): HandlebarsWax\n\n- `handlebars` `{Handlebars}` An instance of Handlebars to wax.\n- `options` `{Object}` (optional) Passed directly to [`require-glob`][reqglob] so check there for more options.\n  - `bustCache` `{Boolean}` (default: `true`) Force reload data, partials, helpers, and decorators.\n  - `cwd` `{String}` (default: `process.cwd()`) Current working directory.\n  - `compileOptions` `{Object}` Default options to use when compiling templates.\n  - `extensions` `{Array}` (default: `['.handlebars', '.hbs', '.html']`) Extensions to compile via `require()`.\n  - `templateOptions` `{Object}` Default options to use when rendering templates.\n  - `parsePartialName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n  - `parseHelperName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n  - `parseDecoratorName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n  - `parseDataName` `{Function(options, file): String}` See section on [registering data](#exporting-data).\n\nProvides a waxed API to augment an instance of Handlebars.\n\n### .handlebars\n\nThe instance of Handlebars in use.\n\n### .context\n\nAn object containing all [registered data](#data-pattern-options-handlebarswax).\n\n### .partials(pattern [, options]): HandlebarsWax\n\n- `pattern` `{String|Array.\u003cString\u003e|Object|Function(handlebars)}` One or more [`minimatch` glob patterns][minimatch] patterns, an object of partials, or a partial factory.\n- `options` `{Object}` Passed directly to [`require-glob`][reqglob] so check there for more options.\n  - `parsePartialName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n\nRequires and registers [partials][partials] en-masse from the file-system or an object. May be called more than once. If names collide, newest wins.\n\n### .helpers(pattern [, options]): HandlebarsWax\n\n- `pattern` `{String|Array.\u003cString\u003e|Object|Function(handlebars)}` One or more [`minimatch` glob patterns][minimatch] patterns, an object of helpers, or a helper factory.\n- `options` `{Object}` Passed directly to [`require-glob`][reqglob] so check there for more options.\n  - `parseHelperName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n\nRequires and registers [helpers][helpers] en-masse from the file-system or an object. May be called more than once. If names collide, newest wins.\n\n### .decorators(pattern [, options]): HandlebarsWax\n\n- `pattern` `{String|Array.\u003cString\u003e|Object|Function(handlebars)}` One or more [`minimatch` glob patterns][minimatch] patterns, an object of decorators, or a decorator factory.\n- `options` `{Object}` Passed directly to [`require-glob`][reqglob] so check there for more options.\n  - `parseDecoratorName` `{Function(options, file): String}` See section on [registering a function](#exporting-a-function).\n\nRequires and registers [decorators][decorators] en-masse from the file-system or an object. May be called more than once. If names collide, newest wins.\n\n### .data(pattern [, options]): HandlebarsWax\n\n- `pattern` `{String|Array.\u003cString\u003e|Object}` One or more [`minimatch` glob patterns][minimatch] patterns, or a data object.\n- `options` `{Object}` Passed directly to [`require-glob`][reqglob] so check there for more options.\n  - `parseDataName` `{Function(options, file): String}` See section on [registering data](#registering-data).\n\nRequires and registers data en-masse from the file-system or an object into the current context. May be called more than once. Results are shallow-merged into a single object. If keys collide, newest wins. See [Context and Rendering](#context-and-rendering).\n\n### .compile(template [, options]): Function(Object)\n\n- `template` `{String|Function(Object)}`\n- `options` `{Object}` See the [`Handlebars.compile` documentation][compile].\n\nCompiles a template that can be executed immediately to produce a final result. Data provided to the template function will be a [child frame][frame] of the current [context](#context). See [Context and Rendering](#context-and-rendering).\n\n### .engine(file, data, callback): HandlebarsWax\n\n- `file` `{String}` File path to dynamic view.\n- `data` `{Object}` Data to pass to the template.\n- `callback` `{Function(err, string)}`\n\n[Express.js][express]-compatible template engine for rendering dynamic views.\n\n```js\nvar express = require('express');\nvar handlebars = require('handlebars');\nvar handlebarsWax = require('handlebars-wax');\n\nvar wax = handlebarsWax(handlebars, { bustCache: false })\n    .partials('./partials/**/*.{hbs,js}')\n    .helpers('./helpers/**/*.js')\n    .data('./data/**/*.{js,json}');\n\nvar app = express()\n    .engine('hbs', wax.engine)\n    .set('view engine', 'hbs')\n    .set('views', './views');\n\n// Route\napp.get('/:foo/:bar', function (req, res) {\n    res.render('index', req.params);\n});\n\n// Listen\napp.listen(3000);\n```\n\n[compile]: http://handlebarsjs.com/reference.html#base-compile\n[decorators]: https://github.com/wycats/handlebars.js/blob/master/docs/decorators-api.md\n[express]: https://github.com/expressjs/express#readme\n[frame]: http://handlebarsjs.com/reference.html#base-createFrame\n[glob]: https://github.com/isaacs/node-glob#usage\n[handlebars]: https://github.com/wycats/handlebars.js#usage\n[helpers]: http://handlebarsjs.com/#helpers\n[keygen]: https://github.com/shannonmoeller/require-glob#keygen\n[minimatch]: https://github.com/isaacs/minimatch#usage\n[partials]: http://handlebarsjs.com/#partials\n[reqglob]: https://github.com/shannonmoeller/require-glob#usage\n[root]: http://handlebarsjs.com/reference.html#data-root\n[square]: http://handlebarsjs.com/expressions.html#basic-blocks\n\n## Contribute\n\nStandards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.\n\n### Test\n\n    $ npm test\n\n----\n\nMIT © [Shannon Moeller](http://shannonmoeller.com)\n\n[amazon-img]:    https://img.shields.io/badge/amazon-tip_jar-yellow.svg?style=flat-square\n[amazon-url]:    https://www.amazon.com/gp/registry/wishlist/1VQM9ID04YPC5?sort=universal-price\n[coveralls-img]: http://img.shields.io/coveralls/shannonmoeller/handlebars-wax/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/shannonmoeller/handlebars-wax\n[downloads-img]: http://img.shields.io/npm/dm/handlebars-wax.svg?style=flat-square\n[npm-img]:       http://img.shields.io/npm/v/handlebars-wax.svg?style=flat-square\n[npm-url]:       https://npmjs.org/package/handlebars-wax\n[travis-img]:    http://img.shields.io/travis/shannonmoeller/handlebars-wax/master.svg?style=flat-square\n[travis-url]:    https://travis-ci.org/shannonmoeller/handlebars-wax\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshannonmoeller%2Fhandlebars-wax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshannonmoeller%2Fhandlebars-wax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshannonmoeller%2Fhandlebars-wax/lists"}