{"id":20892336,"url":"https://github.com/electric-eloquence/fp-tpl-compile","last_synced_at":"2026-05-22T20:34:32.509Z","repository":{"id":57241184,"uuid":"65427367","full_name":"electric-eloquence/fp-tpl-compile","owner":"electric-eloquence","description":"Template Compile extension for Fepper","archived":false,"fork":false,"pushed_at":"2023-12-06T14:21:26.000Z","size":478,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T09:35:11.397Z","etag":null,"topics":["fepper"],"latest_commit_sha":null,"homepage":"https://fepper.io/","language":"HTML","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/electric-eloquence.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-11T01:11:19.000Z","updated_at":"2021-11-24T19:03:58.000Z","dependencies_parsed_at":"2024-11-15T21:50:54.899Z","dependency_job_id":"0aa78f9d-91cd-4961-871f-368aa1433a94","html_url":"https://github.com/electric-eloquence/fp-tpl-compile","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/electric-eloquence/fp-tpl-compile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Ffp-tpl-compile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Ffp-tpl-compile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Ffp-tpl-compile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Ffp-tpl-compile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electric-eloquence","download_url":"https://codeload.github.com/electric-eloquence/fp-tpl-compile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electric-eloquence%2Ffp-tpl-compile/sbom","scorecard":{"id":371834,"data":{"date":"2025-08-11","repo":{"name":"github.com/electric-eloquence/fp-tpl-compile","commit":"3418f6fd039e12af4ab1c3854a25110269f84b1d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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":"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/linux-ci.yml:1","Warn: no topLevel permission defined: .github/workflows/mac-ci.yml:1","Warn: no topLevel permission defined: .github/workflows/windows-ci.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linux-ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/linux-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linux-ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/linux-ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linux-ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/linux-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mac-ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/mac-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mac-ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/mac-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/windows-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/electric-eloquence/fp-tpl-compile/windows-ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/linux-ci.yml:31","Warn: npmCommand not pinned by hash: .github/workflows/mac-ci.yml:31","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"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":"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":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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"}}]},"last_synced_at":"2025-08-18T13:09:52.048Z","repository_id":57241184,"created_at":"2025-08-18T13:09:52.048Z","updated_at":"2025-08-18T13:09:52.048Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33366523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fepper"],"created_at":"2024-11-18T10:11:57.649Z","updated_at":"2026-05-22T20:34:27.498Z","avatar_url":"https://github.com/electric-eloquence.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template Compile extension for Fepper\n\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![Linux Build Status][linux-image]][linux-url]\n[![Mac Build Status][mac-image]][mac-url]\n[![Windows Build Status][windows-image]][windows-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![License][license-image]][license-url]\n\n## Export fully recursed templates in your backend's template language.\n\nThis extension exports templates from the `source/_patterns/03-templates` \ndirectory to the backend, similar to the way that `fp template` does. However, \nthe output will compile all included partials. Furthermore, this extension \nobviates the need to declare a translation for each tag.\n\nThis should prove to be a simpler alternative to Fepper core's `fp template` \ntask, but it is probably not appropriate for many CMSs (like Drupal and \nWordPress) for which `fp template` was originally designed.\n\nInstead, this extension is more suitable for Express-like applications, where \nany number of routes can be assigned a unique template for rendering HTML. \nUnlike Drupal and WordPress, instead of the backend trying to determine which \npartial goes where, the inclusion of partials, as appropriate per route, would \nbe prototyped in Fepper. Running `fp tpl-compile` would then compile a single \ntemplate per route.\n\n### Install\n\n```shell\ncd extend\nnpm install --save-dev fp-tpl-compile\n```\n\n### Commands\n\n#### `fp tpl-compile`\n\nThis does the compilation as described in the first paragraph. You will still \nnormally need to translate from Fepper's Mustache syntax \n(\u003ca href=\"https://github.com/electric-eloquence/feplet\" target=\"_blank\"\u003eFeplet\u003c/a\u003e) \nto the backend's template language. `fp tpl-compile` leverages normal Feplet \nrendering, but targets the tag delimiters instead of the entire tag. You are \nfree to use any alternate delimiter, but we recommend ERB notation, as \nexemplified in the \n\u003ca href=\"https://mustache.github.io/mustache.5.html#Set-Delimiter\" target=\"_blank\"\u003eMustache docs\u003c/a\u003e. \nWrap them in triple curly braces and use them as opening and closing delimiters. \nUse these wrapped delimiters to surround tags destined for the backend. In the \nexample of ERB alternate delimiters and regular `{{` and `}}` delimiters for the \nbackend, the `.json` file specific to the Fepper template must declare `\u003c%` and \n`%\u003e` keys and have their values be `{{` and `}}` respectively. In \n`source/_data/_data.json` file, their values should be `\u003c!--` and `--\u003e` so they \ncan be ignored by humans viewing the UI.\n\nEach template that is to be compiled requires a `.json` file with alternate and \nbackend delimiter declarations. While this may appear to be unnecessarily \nrepetitive, it leverages normal Fepper rendering, instead of hacking around it. \nIt also avoids the chaos that global configurations for opening and closing \ndelimiters for alternate and backend tags would instill. (Yes, that's four \nconfigurations. Yes, their keys would be long and/or unguessable.)\n\nThe `tpl_compile_dir` and `tpl_compile_ext` preferences need to be configured in \n`pref.yml` or the template's `.yml` file. In this way, `fp tpl-compile` will \nknow where to write, and what extension to use.\n\n#### `fp tpl-encode:hbs -e .ext`\n\n`fp tpl-encode:hbs` works in the reverse direction. It encodes backend templates \nfor use as Fepper templates, which can in turn, be compiled back to the backend. \nAssuming the backend template is fully fleshed out, copy it to \n`source/patterns/03-templates`. Do not change its name. Then, run the command \nwith the extension used by the backend. The copied backend template in \n`source/patterns/03-templates` will be replaced by a `.mustache` file, \naccompanied by a `.json` file.\n\nThe `.json` file will declare ERB notation for alternate delimiters. The encoder \nwill also add the `\"\u003c%\": \"\u003c!--\"` and `\"%\u003e\": \"--\u003e\"` key:value pairs to \n`source/_data/_data.json` if they aren't there already.\n\nOne gotcha to be aware of is that underscore-prefixed hidden files must not have \na corresponding `.json` file. Underscore-prefixed `.json` files will get \ncompiled into `source/_data/data.json`, possibly overwriting values for `\u003c%` and \n`%\u003e`.\n\n`fp tpl-encode:hbs` encodes any backend language with tags delimited by `{{` and \n`}}`.\n\nThe output HTML will be formatted by \n\u003ca href=\"https://github.com/beautify-web/js-beautify\" target=\"_blank\"\u003ejs-beautify\u003c/a\u003e. \nTo override the default configurations, modify the `.jsbeautifyrc` file at the \nroot of Fepper.\n\n### Example\n\n##### source/\\_patterns/03-templates/example.mustache:\n\n```handlebars\n\u003ch1\u003e{{{\u003c%}}}title{{{%\u003e}}}\u003c/h1\u003e\n{{\u003e 00-elements/paragraph }}\n\u003cfooter\u003e{{{\u003c%}}}{footer}{{{%\u003e}}}\u003c/footer\u003e\n```\n\n##### source/\\_patterns/03-templates/example.json:\n\n```\n{\n  \"\u003c%\": \"{{\",\n  \"%\u003e\": \"}}\"\n}\n```\n\n##### source/\\_patterns/03-templates/example.yml (or append to pref.yml):\n\n```yaml\ntpl_compile_dir: docroot/templates\ntpl_compile_ext: .hbs\n```\n\n##### source/\\_patterns/00-elements/paragraph.mustache:\n\n```handlebars\n\u003cp\u003e{{{\u003c%}}}backend_content{{{%\u003e}}}{{ placeholder_content }}\u003c/p\u003e\n```\n\n##### source/\\_patterns/00-elements/paragraph.json:\n\n```\n{\n  \"placeholder_content\": \"Lorem ipsum\",\n}\n```\n\n##### Insert into source/\\_data/\\_data.json:\n\n```\n\"\u003c%\": \"\u003c!--\",\n\"%\u003e\": \"--\u003e\"\n```\n\n##### Compiles to backend/docroot/templates/example.hbs:\n\n```handlebars\n\u003ch1\u003e{{title}}\u003c/h1\u003e\n\u003cp\u003e{{backend_content}}\u003c/p\u003e\n\u003cfooter\u003e{{{footer}}}\u003c/footer\u003e\n```\n\n[snyk-image]: https://snyk.io/test/github/electric-eloquence/fp-tpl-compile/master/badge.svg\n[snyk-url]: https://snyk.io/test/github/electric-eloquence/fp-tpl-compile/master\n\n[linux-image]: https://github.com/electric-eloquence/fp-tpl-compile/workflows/Linux%20build/badge.svg?branch=master\n[linux-url]: https://github.com/electric-eloquence/fp-tpl-compile/actions?query=workflow%3A\"Linux+build\"\n\n[mac-image]: https://github.com/electric-eloquence/fp-tpl-compile/workflows/Mac%20build/badge.svg?branch=master\n[mac-url]: https://github.com/electric-eloquence/fp-tpl-compile/actions?query=workflow%3A\"Mac+build\"\n\n[windows-image]: https://github.com/electric-eloquence/fp-tpl-compile/workflows/Windows%20build/badge.svg?branch=master\n[windows-url]: https://github.com/electric-eloquence/fp-tpl-compile/actions?query=workflow%3A\"Windows+build\"\n\n[coveralls-image]: https://img.shields.io/coveralls/electric-eloquence/fp-tpl-compile/master.svg\n[coveralls-url]: https://coveralls.io/r/electric-eloquence/fp-tpl-compile\n\n[license-image]: https://img.shields.io/github/license/electric-eloquence/fp-tpl-compile.svg\n[license-url]: https://raw.githubusercontent.com/electric-eloquence/fp-tpl-compile/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectric-eloquence%2Ffp-tpl-compile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectric-eloquence%2Ffp-tpl-compile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectric-eloquence%2Ffp-tpl-compile/lists"}