{"id":13300782,"url":"https://github.com/josnin/libweb","last_synced_at":"2025-03-10T12:32:53.070Z","repository":{"id":37481391,"uuid":"405383361","full_name":"josnin/libweb","owner":"josnin","description":"libweb is a library for building Web Components","archived":true,"fork":false,"pushed_at":"2023-01-22T13:31:43.000Z","size":217,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T12:50:57.825Z","etag":null,"topics":["fastify","nodejs","typescript","webcomponent"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/josnin.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":"2021-09-11T13:14:22.000Z","updated_at":"2024-05-01T12:50:57.826Z","dependencies_parsed_at":"2023-01-23T09:46:06.197Z","dependency_job_id":null,"html_url":"https://github.com/josnin/libweb","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/josnin%2Flibweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josnin%2Flibweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josnin%2Flibweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josnin%2Flibweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josnin","download_url":"https://codeload.github.com/josnin/libweb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242852024,"owners_count":20195757,"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":["fastify","nodejs","typescript","webcomponent"],"created_at":"2024-07-29T17:43:04.417Z","updated_at":"2025-03-10T12:32:52.748Z","avatar_url":"https://github.com/josnin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libweb is a library for building [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)\n\n* Template syntax\n* Data binding\n* Event handling\n\n## Use directly in browser\n\n```html \n\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e       \n    \u003cscript src=\"https://josnin.sgp1.digitaloceanspaces.com/libweb/dist/libweb.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n   \u003capp-root\u003e\u003c/app-root\u003e\n    \n   \u003cscript type=\"module\"\u003e     \n     class BindingComponent extends LWElement { \n         __reactive = { username: 'darling' };\n         __template = `\u003cinput data-bind=\"username\" type=\"text\"/\u003e  {username}`;\n     }\n     customElements.define('app-root', BindingComponent);\n   \u003c/script\u003e \n    \n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n\n\n## Create Events\n```js\nimport { LWElement } from 'libweb.js';\n\nclass EventComponent extends LWElement { \n\n  firstname = 'Johny'; // non reactive variable\n  __template = `\u003cbutton @click=\"alertMe({firstname})\"\u003eClick Sample event\u003c/button\u003e`\n\n  alertMe(arg) {\n   alert(`Hello ${arg}`);\n  }\n \n}\n\ncustomElements.define('sample-event', EventComponent);\n\n```\n### index.html\n```html\n\u003csample-event\u003e\u003c/sample-event\u003e\n```\n\n## Installation \n```\nnpm install\n```\n\n## How to run development server? \n```\ncd ~/Documents/libweb/\nnpm run build\nnpm start\n```\n\n\n### Help\n\nNeed help? Open an issue in: [ISSUES](https://github.com/josnin/libweb/issues)\n\n\n### Contributing\nWant to improve and add feature? Fork the repo, add your changes and send a pull request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosnin%2Flibweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosnin%2Flibweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosnin%2Flibweb/lists"}