{"id":22220348,"url":"https://github.com/labor-digital/bits","last_synced_at":"2025-10-25T04:38:58.228Z","repository":{"id":48310937,"uuid":"346024621","full_name":"labor-digital/bits","owner":"labor-digital","description":"Code encapsulation, data-binding and reactive HTML in the light-dom; without a framework - with web-components","archived":false,"fork":false,"pushed_at":"2022-06-03T10:47:04.000Z","size":5335,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T04:04:53.677Z","etag":null,"topics":["framework","html","javascript","reactive","typescript"],"latest_commit_sha":null,"homepage":"https://bits.labor.tools","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labor-digital.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-09T13:58:35.000Z","updated_at":"2021-12-19T17:33:14.000Z","dependencies_parsed_at":"2022-08-31T08:21:02.781Z","dependency_job_id":null,"html_url":"https://github.com/labor-digital/bits","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labor-digital%2Fbits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labor-digital%2Fbits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labor-digital%2Fbits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labor-digital%2Fbits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labor-digital","download_url":"https://codeload.github.com/labor-digital/bits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245422921,"owners_count":20612725,"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":["framework","html","javascript","reactive","typescript"],"created_at":"2024-12-02T23:08:17.183Z","updated_at":"2025-10-25T04:38:53.174Z","avatar_url":"https://github.com/labor-digital.png","language":"TypeScript","readme":"# LABOR - Bits\n\nData binding and reactive re-rendering of HTML is a concept that lies at the foundation of all modern javascript frameworks like, react, vue or angular. While\ntheir component based architecture and rendering of HTML in a virtual DOM (or whatever your framework calls it) is quite convenient, it is a commitment - If you\ngo the framework route, you do ALL HTML in your framework - no (classic) server side rendering of HTML in PHP, Java or Node for you. (Yes, I know you CAN do\nsomething like it, but it ain't pretty).\n\n## What it does\n\nThat's were bits come in handy. This library utilizes the web-component api to create javascript blocks/plugins/widgets on a statically rendered HTML page. Each\nblock or bit runs like a (web)component in your typical framework, but binds to the real/light dom instead of a virtual abstraction.\n\nThis library aims to do three things:\n\n* Create a loose scaffold to structure the code of your javascript\n* Simplify the data-binding between javascript and your dom\n* Keep your head free from unbinding listeners or data when your bit/component is destroyed\n\n## A word of caution\n\nThis is library is designed to be used with **typescript** and decorators. While you could use it without typescript, it is currently clearly not optimized to\nrun without it. If you like what you see, but typescript is a no-go for you, give me a shout, and we will figure something out :)\n\n## Documentation\n\nAn extensive documentation of all features can be found [here](https://bits.labor.tools).\n\n## Installation\n\nInstall this package using npm:\n\n```\nnpm install @labor-digital/bits\n```\n\n## Browser support\n\nThe library supports all **modern** browsers, that have at least the most basic implementation of web-components. It also has a built-in polyfill for browsers\nwithout the web-component api.\n\n### Internet Explorer\n\nYes, you can use this library with the IE11, however you need to install some polyfills in you bundle if you want to support it. To install the polyfills you\nneed to install the following dependencies:\n\n```\nnpm install @webcomponents/template core-js\n```\n\nIf you are using webpack you can now add the following elements in your \"entry\" configuration:\n\n```javascript\nmodule.exports = {\n    entry: [\n        '@webcomponents/template/template.js',\n        'core-js/features/object/assign',\n        'core-js/features/object/is',\n        'core-js/features/object/entries',\n        'core-js/features/promise',\n        'core-js/features/symbol',\n        // This is your real entry point. Make sure the polyfills are added before\n        // your main entry, otherwise they might not trigger correctly.\n        './src/main.ts'\n    ]\n    // ... Your other webpack config\n}\n```\n\nIf you are not running webpack, simply import those files in your main.ts file\n\n```typescript\nimport '@webcomponents/template/template.js';\nimport 'core-js/features/object/assign';\nimport 'core-js/features/object/is';\nimport 'core-js/features/object/entries';\nimport 'core-js/features/promise';\nimport 'core-js/features/symbol';\n// Your other imports and code should be below those lines\n```\n\n## Postcardware\n\nYou're free to use this package, but if it makes it to your production environment, we highly appreciate you sending us a postcard from your hometown,\nmentioning which of our package(s) you are using.\n\nOur address is: LABOR.digital - Fischtorplatz 21 - 55116 Mainz, Germany.\n\nWe publish all received postcards on our [company website](https://labor.digital). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabor-digital%2Fbits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabor-digital%2Fbits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabor-digital%2Fbits/lists"}