{"id":18047971,"url":"https://github.com/retailmenotsandbox/roux-handlebars-tools","last_synced_at":"2025-04-10T08:53:34.597Z","repository":{"id":11351877,"uuid":"69395999","full_name":"RetailMeNotSandbox/roux-handlebars-tools","owner":"RetailMeNotSandbox","description":"Tools for working with Roux ingredient Handlebars templates","archived":false,"fork":false,"pushed_at":"2022-12-11T04:32:12.000Z","size":1506,"stargazers_count":0,"open_issues_count":17,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T15:40:42.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RetailMeNotSandbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T20:31:20.000Z","updated_at":"2020-08-26T04:59:56.000Z","dependencies_parsed_at":"2023-01-11T18:05:30.687Z","dependency_job_id":null,"html_url":"https://github.com/RetailMeNotSandbox/roux-handlebars-tools","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Froux-handlebars-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Froux-handlebars-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Froux-handlebars-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Froux-handlebars-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RetailMeNotSandbox","download_url":"https://codeload.github.com/RetailMeNotSandbox/roux-handlebars-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190407,"owners_count":21062277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-30T20:10:21.972Z","updated_at":"2025-04-10T08:53:34.575Z","avatar_url":"https://github.com/RetailMeNotSandbox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @retailmenot/roux-handlebars-tools\n\nThis module provides tools for working with Roux ingredients that provide\na Handlebars entry point.\n\n[![Build Status](https://travis-ci.org/RetailMeNotSandbox/roux-handlebars-tools.svg?branch=master)](https://travis-ci.org/RetailMeNotSandbox/roux-handlebars-tools)\n[![Coverage Status](https://coveralls.io/repos/github/RetailMeNotSandbox/roux-handlebars-tools/badge.svg?branch=master)](https://coveralls.io/github/RetailMeNotSandbox/roux-handlebars-tools?branch=master) \n\n## Installation\n\n```sh\nnpm install @retailmenot/roux-handlebars-tools\n```\n\n## API\n\n### `resolvePartialName`\n\nGet a path to the file referenced by the partialName\n\n- `partialName` - the name of the partial to locate\n- `config` - optional configuration object\n  - `config.extensions` - optional array of extensions to try when looking for\n      partials; defaults to `['hbs', 'handlebars']`\n  - `config.pantries` - an optional cache of `Pantry` instances\n  - `config.pantrySearchPaths` - optional array of paths to search for pantries\n      in if not found in the cache; defaults to `['$CWD/node_modules']`\n  - `config.partials - an optional map of partial names to Handlebars source\n      code; the partials will be processed if transitively depended on, but will\n      not appear in the result\n  - `config.partialSearchPaths` - optional array of paths to search for partials\n      in the filesystem; defaults to `['$CWD']`\n\n### `getPartialDependencies`\n\nThis method returns a promise of a map from the names of all partials a template\ntransitively depends on to their absolute path in the filesystem.\n\nIt accepts an optional map of partials as `config.partials`. These will be\nexplored if transitively depended on, but members of `config.partials` will not\nbe included in the result.\n\n- `template` - the source code of a Handlebars template\n- `config` - optional configuration object\n  - `config.extensions` - optional array of extensions to try when looking for\n      partials; defaults to `['hbs', 'handlebars']`\n  - `config.pantries` - an optional cache of `Pantry` instances\n  - `config.pantrySearchPaths` - optional array of paths to search for pantries\n      in if not found in the cache; defaults to `['$CWD/node_modules']`\n  - `config.partials - an optional map of partial names to Handlebars source\n      code; the partials will be processed if transitively depended on, but will\n      not appear in the result\n  - `config.partialSearchPaths` - optional array of paths to search for partials\n      in the filesystem; defaults to `['$CWD']`\n\n#### Name resolution\n\nThis method will first attempt to resolve a prefix of the partial name as a Roux\ningredient. If able to do so, the partial name is assumed to refer to a template\nin that ingredient. It will then attempt to get its absolute path, failing if\nthe file doesn't exist.\n\nIf unable to resolve a prefix as a Roux ingredient, the method attempts to find\nthe partial name relative to the paths in `config.partialSearchPaths`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailmenotsandbox%2Froux-handlebars-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretailmenotsandbox%2Froux-handlebars-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailmenotsandbox%2Froux-handlebars-tools/lists"}