{"id":17800894,"url":"https://github.com/refi64/protic","last_synced_at":"2026-01-11T04:42:09.258Z","repository":{"id":56837405,"uuid":"113620548","full_name":"refi64/protic","owner":"refi64","description":"Zero-effort HTML preprocessing/templating, with conditionals, includes, macros, and more","archived":false,"fork":false,"pushed_at":"2019-09-01T20:39:59.000Z","size":829,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:06:47.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://refi64.com/protic","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refi64.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-12-08T21:51:41.000Z","updated_at":"2019-10-26T00:44:07.000Z","dependencies_parsed_at":"2022-09-13T08:42:18.364Z","dependency_job_id":null,"html_url":"https://github.com/refi64/protic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fprotic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fprotic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fprotic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fprotic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/protic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758278,"owners_count":20828919,"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-27T12:32:27.964Z","updated_at":"2026-01-11T04:42:09.216Z","avatar_url":"https://github.com/refi64.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protic\n\nZero-effort HTML preprocessing/templating, with conditionals, includes, macros, and more.\n\n## Learning More\n\nCheck out [the docs](https://refi64.com/protic), and try out\n[the live demo](https://refi64.com/protic/demo.html).\n\n## Example\n\n```html\n\u003cdiv +#myid +.mycls\u003e\u003c/div\u003e \u003c!-- Easy ids and classes --\u003e\n\n\u003c!-- If statements --\u003e\n\u003c+ if=\"$config == dev\" do\u003e\n  \u003cp\u003eDevelopment build!\u003c/p\u003e\n\u003c+ orelse do\u003e\n  \u003cp\u003eProduction build!\u003c/p\u003e\n\u003c/+\u003e\n\n\u003c!-- HTML includes (and conditional includes) --\u003e\n\u003c+ include=\"myfile.html\"\u003e\n\u003c+ if=\"$config == dev\" include=\"dev.html\"\u003e\n\u003c+ else include=\"prod.html\"\u003e\n\n\u003c!-- Variables --\u003e\n\u003c+ set var=\"value\"\u003e\n\n\u003c!-- Expressions inside attributes --\u003e\n\u003c+ set width=\"20px\"\u003e\n\u003cdiv +style=\"width: $width\"\u003e\u003c/div\u003e\n\n\u003c+ for var to=\"a b c\"\u003e\n\u003c/+\u003e\n\n\u003c!-- Macros --\u003e\n\u003c+ macro=\"expand\" slot\u003e\n  \u003cp\u003eYour name is: \u003c+ value=\"$@name\"\u003e\u003c/p\u003e\n  \u003c+ if=\"$@?is-upper\" do\u003e\n    \u003cp\u003eIs uppercase!\u003c/p\u003e\n  \u003c/+\u003e\n\n  \u003c!-- Debug printing --\u003e\n  \u003c+ print=\"is-upper: ($@?is-upper and true or false) myname: $@name\"\u003e\n  \u003c+ slot\u003e\n\u003c/+\u003e\n\n\u003c!-- Using macros --\u003e\n\u003c+@ expand name=\"myname\" is-upper\u003e\n  \u003cp\u003eStuff here\u003c/p\u003e\n\u003c/+@\u003e\n\n\u003c!-- Like 'include', but also imports macros --\u003e\n\u003c+ require=\"myfile.html\"\u003e\n```\n\n## Source code structure\n\n- `protic` - The protic core code, written in Dart.\n- `protic-js` - protic, compiled to JavaScript for use in Node or the browser.\n- `protic_transformer` - A Dart Pub transformer for protic\n- `docs` - Website/documentation, powered by [Docute](https://docute.js.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fprotic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fprotic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fprotic/lists"}