{"id":13452032,"url":"https://github.com/antonmedv/monkberry","last_synced_at":"2025-04-09T09:08:05.152Z","repository":{"id":57302454,"uuid":"37895327","full_name":"antonmedv/monkberry","owner":"antonmedv","description":"Monkberry is a JavaScript library for building web user interfaces","archived":false,"fork":false,"pushed_at":"2019-08-30T11:12:33.000Z","size":581,"stargazers_count":1495,"open_issues_count":26,"forks_count":78,"subscribers_count":49,"default_branch":"master","last_synced_at":"2024-05-02T01:09:22.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://monkberry.js.org","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/antonmedv.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":"2015-06-23T03:37:36.000Z","updated_at":"2024-04-08T01:13:55.000Z","dependencies_parsed_at":"2022-09-13T03:00:49.860Z","dependency_job_id":null,"html_url":"https://github.com/antonmedv/monkberry","commit_stats":null,"previous_names":["monkberry/monkberry"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmedv%2Fmonkberry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmedv%2Fmonkberry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmedv%2Fmonkberry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonmedv%2Fmonkberry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonmedv","download_url":"https://codeload.github.com/antonmedv/monkberry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"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-07-31T07:01:10.688Z","updated_at":"2025-04-09T09:08:05.128Z","avatar_url":"https://github.com/antonmedv.png","language":"JavaScript","funding_links":["https://www.patreon.com/antonmedv"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Monkberry\n[![npm](https://img.shields.io/npm/v/monkberry.svg)](https://www.npmjs.com/package/monkberry)\n[![Build Status](https://travis-ci.org/monkberry/monkberry.svg?branch=master)](https://travis-ci.org/monkberry/monkberry)\n\nMonkberry is **blazingly fast**, **small `1kb`** and **simple** JavaScript library for building **web user interfaces**.\n\n## Example\n\nMonkberry comes with powerfull templating engine, which is compiled to JavaScript.\n\n```twig\n\u003col\u003e\n  {% for todos %}\n    \u003cli\u003e\n      {% if complete %}\n        \u003cdel\u003e{{ text }}\u003c/del\u003e\n      {% else %}\n        \u003cem\u003e{{ text }}\u003c/em\u003e\n      {% endif %}\n    \u003c/li\u003e\n  {% endfor %}\n\u003c/ol\u003e\n```\n\nand then\n\n```js\nimport Monkberry from 'monkberry';\nimport Template from 'template.monk';\n\nconst view = Monkberry.render(Template, document.body);\n\nview.update({todos: [...]});\n```\n\n## Features\n\n* Small **`1kb`** minified \u0026 gzipped\n* Simple, small learning curve\n* Fully tested\n* Precompiled templates\n* Source maps\n* Custom tags\n* Blazingly fast (only necessary dom updates)\n\n\u003ca href=\"https://www.patreon.com/antonmedv\"\u003e\n\t\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e\n\n## Documentation\n\nDocumentation available on [monkberry.js.org](http://monkberry.js.org) site.\n\n## Development\n\nIf you want to hack on Monkberry, the first step is to fork the repo.\n\n```sh\n# Build compiler\nnpm run build\n\n# Build parser\nnpm run build:parser\n\n# Watch changes and rebuild\nnpm run watch\n\n# Start tests server\ntestem\n```\n\n## Plugins\n\n* [Atom Package](https://atom.io/packages/language-monkberry)\n* [Sublime Text Package](https://github.com/monkberry/language-monkberry)\n\n## Performance\n\n#### [Benchmarks](http://monkberry.github.io/benchmark/)\n\nWhy is Monkberry so fast? Even in comparison with React, Monkberry is **10 times faster**, sometimes **100 times faster**.\nIt's because Monkberry will do only necessary dom updates, and does it in a completely different way than React does.\nMonkberry compiles template to plain JavaScript to gain an advantage by using v8 **hidden classes** and **reduce call stack**.\nThere is no virtual dom (in general, an react app have to keep 3 virtual doms), for example next template will be generated to JavaScript code which will do only necessary dom updates on state changes.\n\n```twig\n\u003cdiv\u003e\n  ...\n    \u003ch1\u003e{{ title }}\u003c/h1\u003e\n  ...\n\u003c/div\u003e\n```\n\nWill be compiled to code like this:\n\n```js\nfunction (state) {\n  h1.textContent = state.title;\n}\n```\n\nBenchmarks covers a few use cases and compares Monkberry with React and innerHTML. Also, it contains real site code and data.\n\n\n## License\n\nThe MIT License (MIT) Copyright © 2016 Medvedev Anton\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmedv%2Fmonkberry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonmedv%2Fmonkberry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonmedv%2Fmonkberry/lists"}