{"id":21250849,"url":"https://github.com/michal-wrzosek/react-component-lib","last_synced_at":"2025-04-05T11:05:39.341Z","repository":{"id":34867700,"uuid":"177029228","full_name":"michal-wrzosek/react-component-lib","owner":"michal-wrzosek","description":"Boilerplate repo for creating npm packages with React components written in TypeScript and using styled-components","archived":false,"fork":false,"pushed_at":"2024-12-16T03:25:39.000Z","size":1433,"stargazers_count":74,"open_issues_count":6,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:06:27.733Z","etag":null,"topics":["create-react-app","library","react-components","rollup","styled-components","typescript"],"latest_commit_sha":null,"homepage":"https://medium.com/@xfor/developing-publishing-react-component-library-to-npm-styled-components-typescript-cc8274305f5a","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/michal-wrzosek.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-03-21T21:52:03.000Z","updated_at":"2024-12-09T23:11:16.000Z","dependencies_parsed_at":"2024-12-29T08:09:05.631Z","dependency_job_id":"6c79e277-59f4-4712-88d7-eec9a7f5d54d","html_url":"https://github.com/michal-wrzosek/react-component-lib","commit_stats":{"total_commits":24,"total_committers":4,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"a825fa7fb991a7d4e7e1ef1a6007d9e33ca10bfa"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Freact-component-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Freact-component-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Freact-component-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michal-wrzosek%2Freact-component-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michal-wrzosek","download_url":"https://codeload.github.com/michal-wrzosek/react-component-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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":["create-react-app","library","react-components","rollup","styled-components","typescript"],"created_at":"2024-11-21T03:39:17.938Z","updated_at":"2025-04-05T11:05:39.296Z","avatar_url":"https://github.com/michal-wrzosek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-component-lib\n\nThis is a boilerplate repository for creating npm packages with React components written in TypeScript and using styled-components.\n\nMedium article explaining step by step how to use this repo to publish your own library to NPM:\nhttps://medium.com/@xfor/developing-publishing-react-component-library-to-npm-styled-components-typescript-cc8274305f5a\n\n## Installation:\n\nTo install all dependencies run:\n\n```\nnpm i\n```\n\nIt will install:\n\n- `dependencies` and `devDependencies` from ./package.json\n- `peerDependencies` from ./package.json thanks to `install-peers`\n- `dependencies` and `devDependencies` from ./example-nextjs/package.json (example `nextjs` app for testing)\n\n## Developing your library:\n\nTo start developing your library, run `npm run dev`. It will build your library and run example `nextjs` app where you can test your components. Each time you make changes to your library or example app, app will be reloaded to reflect your changes.\n\n## Styled-components:\n\nDeveloping library with components built with styled-components is challenging because you have to keep only one instance of styled-components. If you would just symlink your library (`file:../` or `npm link`) to example app that is also using styled-components you'll get a console warning about multiple instances of styled-components (even though styled-components are peer dependency) and your styles will be possibly broken. To be able to conveniently develop styled components I am injecting bundled files directly into example app's /src folder and importing it in `client.tsx` file along with type declaration.\n\n## Typescript\n\nThis boilerplate lets you develop your libraries in Typescript and you can simultaneously test it in Typescript example nextjs app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichal-wrzosek%2Freact-component-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichal-wrzosek%2Freact-component-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichal-wrzosek%2Freact-component-lib/lists"}