{"id":20294255,"url":"https://github.com/teambit/example-templates","last_synced_at":"2026-05-30T21:31:36.554Z","repository":{"id":80427570,"uuid":"241329229","full_name":"teambit/example-templates","owner":"teambit","description":"Automatic templates for bit.dev's examples ","archived":false,"fork":false,"pushed_at":"2020-03-24T11:35:06.000Z","size":777,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-04T05:29:41.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bit.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teambit.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":"2020-02-18T10:08:49.000Z","updated_at":"2023-12-15T04:44:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bdb4203-5388-4e93-a38e-7a14a4ad6471","html_url":"https://github.com/teambit/example-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teambit/example-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fexample-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fexample-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fexample-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fexample-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teambit","download_url":"https://codeload.github.com/teambit/example-templates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fexample-templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-14T15:28:32.035Z","updated_at":"2026-05-30T21:31:36.533Z","avatar_url":"https://github.com/teambit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"apache\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://github.com/teambit/example-templates/blob/master/README.md#contributing\"\u003e\u003cimg alt=\"prs\" src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://circleci.com/gh/teambit/example-templates/tree/master\"\u003e\u003cimg alt=\"Circle Status\" src=\"https://circleci.com/gh/teambit/example-templates/tree/master.svg?style=shield\u0026circle-token=4cdd0cd2aeade2d932231f4d067350fd05ad17d9\"\u003e\n# Example Templates\n\nThis repository contains the boilerplates used by [bit.dev's playground](https://docs.bit.dev/docs/bit-dev#component-playground) for creating new examples.  \n\n![screenshot](./screenshot.png)\n\n## Templates\n\nThe templates are located under the components/template folder in thie repo, and also published as public Bit components [here](https://bit.dev/bit/javascript?namespaces=template).\nHere is the list of existing templates:\n* [react](./components/template/react/react-template.ts) (most of the code is [here](./components/default-generator/react/react/react-default-code.ts))\n* [react-native](./components/template/react-native/index.ts)\n* [angular](./components/template/angular/ng-template-generator.ts)\n* [vue](./components/template/vue/vue-template.ts) (most of code is [here](./components/default-generator/vue/vue-default-code.ts))\n\n### Template APIs\nA template component should export the following interface  \n(Currently components use different names for exports, but they will be unified in the future)\n\n```tsx\nmainFile: string;\nmakeTemplate: ({ npmId: string }) =\u003e {\n\tfiles: { [filepath: string]: string };\n\tmainFile: string;\n};\n```\n\nExample:\n```tsx\nexport const mainFile = \"index.js\";\nexport const makeTemplate = ({npmId}) =\u003e (`\n\timport Component from ${npmId}\n\t\n\texport default () =\u003e Component();\n`)\n```\n\n## Contributing\n\nContributions are welcome on this repository, and will be published to the collection and to bit.dev. \n\n1. Clone the repository\n1. [Install bit](https://docs.bit.dev/docs/installation)\n1. Run `bit import` to sync components.\n1. Update code in a new branch.\n1. Run `bit build` (or `yarn build`)\n1. Test the components: `bit test` (or `yarn test`)\n1. Create a *pull request* with your changes\n\nAfter approving the PR, changes will be exported to the collection, and deployed to bit.dev.  \n\nNote:  \nWe are in a process of unifying all components to use the same tester. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Fexample-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteambit%2Fexample-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Fexample-templates/lists"}