{"id":15138739,"url":"https://github.com/dmytro-krekota/jlto","last_synced_at":"2025-08-31T11:45:31.604Z","repository":{"id":34174490,"uuid":"88446834","full_name":"dmytro-krekota/jlto","owner":"dmytro-krekota","description":"Nodejs-based tool for optimizing Jinja like templates.","archived":false,"fork":false,"pushed_at":"2023-01-09T02:48:11.000Z","size":870,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T21:54:41.499Z","etag":null,"topics":["jinja","jinja2","jinja2-templates","jinjava","liquid","nodejs","nunjucks","nunjucks-templates","optimization","twig","twig-templates"],"latest_commit_sha":null,"homepage":"","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/dmytro-krekota.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":"2017-04-16T22:39:34.000Z","updated_at":"2023-12-26T02:19:57.000Z","dependencies_parsed_at":"2023-01-15T05:05:14.575Z","dependency_job_id":null,"html_url":"https://github.com/dmytro-krekota/jlto","commit_stats":null,"previous_names":["dmitrykrekota/jlto"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dmytro-krekota/jlto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmytro-krekota%2Fjlto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmytro-krekota%2Fjlto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmytro-krekota%2Fjlto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmytro-krekota%2Fjlto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmytro-krekota","download_url":"https://codeload.github.com/dmytro-krekota/jlto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmytro-krekota%2Fjlto/sbom","scorecard":{"id":113197,"data":{"date":"2025-08-11","repo":{"name":"github.com/dmytro-krekota/jlto","commit":"6d98c0a015140be2838af3d2f1ca2b246ee86d9f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/24 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":"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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-x77j-w7wf-fjmw","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"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-15T16:45:16.621Z","repository_id":34174490,"created_at":"2025-08-15T16:45:16.621Z","updated_at":"2025-08-15T16:45:16.621Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272976403,"owners_count":25025040,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":["jinja","jinja2","jinja2-templates","jinjava","liquid","nodejs","nunjucks","nunjucks-templates","optimization","twig","twig-templates"],"created_at":"2024-09-26T07:44:10.866Z","updated_at":"2025-08-31T11:45:31.544Z","avatar_url":"https://github.com/dmytro-krekota.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Support Ukraine 🇺🇦\n\n- Via United24 platform (the initiative of the President of Ukraine):\n  - [One click donation (credit card, bank transfer or crypto)](https://u24.gov.ua/)\n- Via National Bank of Ukraine:\n  - [Ukrainian army](https://bank.gov.ua/en/about/support-the-armed-forces)\n  - [Humanitarian aid to Ukraine](https://bank.gov.ua/en/about/humanitarian-aid-to-ukraine)\n\n[#StandWithUkraine](https://twitter.com/hashtag/StandWithUkraine)\n\n# JLTO\n\n[![CircleCI](https://circleci.com/gh/dmytro-krekota/jlto.svg?style=svg)](https://app.circleci.com/pipelines/github/dmytro-krekota/jlto)\n[![Coverage](https://coveralls.io/repos/github/dmytro-krekota/jlto/badge.svg?branch=master)](https://coveralls.io/github/dmytro-krekota/jlto?branch=master) [![Join the chat at https://gitter.im/dmytro-krekota_jlto/Lobby](https://badges.gitter.im/dmytro-krekota_jlto/Lobby.svg)](https://gitter.im/dmytro-krekota_jlto/community?source=orgpage)\n\n[![NPM](https://nodei.co/npm/jlto.png?downloads=true)](https://nodei.co/npm/jlto/)\n\n\u003e Jinja Like Templates Optimizer (JLTO) is a Nodejs-based tool for optimizing Jinja like templates.\n\n**Gulp tool for JLTO:**\n\n[gulp-jlto](https://www.npmjs.com/package/gulp-jlto)\n\n**Supported template engines:**\n\n- [Nunjucks](https://mozilla.github.io/nunjucks/) (Tested with unit tests)\n- [Twig.js](https://github.com/twigjs/twig.js) (Tested with unit tests)\n- [LiquidNode](https://github.com/sirlantis/liquid-node) (Tested with unit tests)\n- [Twig](https://twig.sensiolabs.org/)\n- [Jinja](http://jinja.pocoo.org/)\n- [Django](https://docs.djangoproject.com/en/1.11/ref/templates/language/)\n- [Liquid](https://shopify.github.io/liquid/)\n- [Jinjava](https://github.com/HubSpot/jinjava)\n\n**Available options:**\n\n- expressionStart - symbols at the beginning of expressions\n- expressionEnd - symbols at the end of expressions\n- blockStart - symbols at the beginning of blocks\n- blockEnd - symbols at the end of blocks\n- commentStart - symbols at the beginning of comments\n- commentEnd - symbols at the beginning of comments\n- specialChars - special chars in blocks and expressions\n- cleanupBlocks - flag for optimize blocks\n- cleanupExpressions - flag for optimize expressions\n- removeComments - flag for removing comments\n- minifyHtml - flag for minifying html code with [html-minifier](https://www.npmjs.com/package/html-minifier)\n- minifyHtmlOptions - options for html-minifier\n\nSee default values for above options [here](https://github.com/dmytro-krekota/jlto/blob/master/lib/core/default.js).\n\n## Usage\n\n**Simple example:**\n\n```js\nlet jlto = require('jlto');\nlet template = `\n{{ hello }}\n{{   \"\u003cJohn   \u0026   Paul\u003e ?\"     | escape   }}\n{{ '2.7'   | round }}{%  if  product  %}Product exists.{%  endif  %}\n`;\nlet optimizedTemplate = jlto.optimizeString(template);\n// optimizedTemplate:\n// `\n//{{hello}}\n//{{\"\u003cJohn   \u0026   Paul\u003e ?\"|escape}}\n//{{'2.7'|round}}{%if product%}Product exists.{%endif%}\n// `\n```\n\n**Example of using minifyHtml option:**\n\n```js\nlet jlto = require('jlto');\nlet template = `\n\u003cdiv {% if id %}id=\"{{ id | escape('html_attr') }}\"{% endif %} class=\"section-container {{ classes | join(' ') | html_attribute }}\"\u003e\n  \u003cdiv class=\"section-writables\"\u003e\n    {% for writable in writables  %}\n      {{ writable | write | raw }}\n    {% endfor %}\n  \u003c/div\u003e\n\u003c/div\u003e`;\nlet optimizedTemplate = jlto.optimizeString(template, {minifyHtml: true});\n// optimizedTemplate:\n// `\u003cdiv {%if id%} id=\"{{id|escape('html_attr')}}\" {%endif%} class=\"section-container {{classes|join(' ')|html_attribute}}\"\u003e\u003cdiv class=\"section-writables\"\u003e {%for writable in writables%} {{writable|write|raw}} {%endfor%} \u003c/div\u003e\u003c/div\u003e`\n```\n\n**Example of \"nunjucks\" templates minification with the custom GruntJS task:**\n\n```js\nmodule.exports = (grunt) =\u003e {\n  grunt.registerTask('min-nunjucks', 'Min nunjucks templates', () =\u003e {\n    let jlto = require('jlto');\n    let fs = require('fs');\n    let glob = require('glob');\n    let done = this.async();\n    glob('./**/*.nunjucks.html', (error, files) =\u003e {\n      files.forEach((filePath) =\u003e {\n        let fileContent;\n        fileContent = fs.readFileSync(filePath).toString();\n        try {\n          fileContent = jlto.optimizeString(fileContent, {minifyHtml: true});\n          fs.writeFileSync(filePath, fileContent);\n        } catch (ignored) {}\n      });\n      return done();\n    });\n  });\n};\n```\n\n## Tests\n\nUnit tests are written using Mocha and Chai. To run, invoke `npm test`.\n\n## License\n\nJLTO is available under the [MIT license](https://opensource.org/licenses/MIT), see the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmytro-krekota%2Fjlto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmytro-krekota%2Fjlto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmytro-krekota%2Fjlto/lists"}