{"id":20189317,"url":"https://github.com/bugs181/declarative","last_synced_at":"2026-04-09T11:10:13.305Z","repository":{"id":101790530,"uuid":"169677099","full_name":"bugs181/Declarative","owner":"bugs181","description":"Declarative templating for Render frameworks such as HTML, React, React Native, Vue, etc","archived":false,"fork":false,"pushed_at":"2019-02-09T21:50:49.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T14:55:59.653Z","etag":null,"topics":["declarative","declarative-programming","html","javascript","json","react","react-native","template","templating","vue","vuejs","vuejs2"],"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/bugs181.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":"2019-02-08T02:54:48.000Z","updated_at":"2019-03-05T15:02:55.000Z","dependencies_parsed_at":"2023-04-11T17:31:57.220Z","dependency_job_id":null,"html_url":"https://github.com/bugs181/Declarative","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/bugs181%2FDeclarative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugs181%2FDeclarative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugs181%2FDeclarative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugs181%2FDeclarative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugs181","download_url":"https://codeload.github.com/bugs181/Declarative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241622601,"owners_count":19992504,"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":["declarative","declarative-programming","html","javascript","json","react","react-native","template","templating","vue","vuejs","vuejs2"],"created_at":"2024-11-14T03:35:52.253Z","updated_at":"2025-12-30T22:49:06.457Z","avatar_url":"https://github.com/bugs181.png","language":"JavaScript","readme":"# Declarative\nDeclarative templating for Render frameworks such as HTML, React, React Native, Vue, etc\n\n\u003cbr\u003e\n\n## Setup: ##\n### Node: ###\n```\nconst Decl = require('Declarative')\n```\n### Browser: ###\n```\n\u003cscript src='js/Declarative.js' /\u003e\nvar Decl = Declarative\n```\n\n\u003cbr\u003e\n\n## Example use: ##\n```\nconst template = {}\nconst appContext = {}\n\nlet decl = new Decl(template, appContext)\nlet output = decl.render()\n```\n\n## Template Example: ###\n```\n{\n  div: {\n    someElement: {\n      condition: function() { return true }, // Accepts Function, Boolean, or String, returns Boolean or String\n      content: function() { return 'something' }, // Accepts Function, String, or Object, returns String or Object\n      tag: 'h2', // optional tag string, can be used instead of tags property.\n      tags: ['\u003ch2\u003e', '\u003c/h2\u003e'], // optional tags, can be any valid HTML or framework syntax\n      props: { class: 'someElCls' }, // optional object which adds properties to tag.\n    }\n  }\n}\n```\n\n## Optional Context Example: ##\n```\n{\n  user: { // element name\n    // props\n    username: 'Levi',\n    loggedIn: true,\n    admin: false,\n  }\n}\n```\n\n## Output Example: ##\n```\n\u003cdiv\u003e\u003ch1\u003eWelcome Levi\u003c/h1\u003e\u003c/div\u003e\n```\n\n\u003cbr\u003e\n\n## TODOs: ##\n- [ ] More error checking\n- [ ] Element ID's\n- [ ] Data binding for elements\n- [ ] Events for data binding\n- [ ] References to other elements\n\n\u003cbr\u003e\n\n## License: ##\n[MIT](https://github.com/bugs181/DeclarativeJSON/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugs181%2Fdeclarative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugs181%2Fdeclarative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugs181%2Fdeclarative/lists"}