{"id":18385568,"url":"https://github.com/eruptionjs/react-lib","last_synced_at":"2025-04-12T00:49:06.625Z","repository":{"id":203548168,"uuid":"709848569","full_name":"eruptionjs/react-lib","owner":"eruptionjs","description":"🌋 lib/components boilerplate for projects made with React/Typescript, on top of Vite ⚡","archived":false,"fork":false,"pushed_at":"2023-10-25T14:45:36.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T00:49:03.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/eruptionjs.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,"governance":null}},"created_at":"2023-10-25T14:14:29.000Z","updated_at":"2023-11-23T13:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"820d7e8c-f09e-4f2a-8a04-93b18ba3c93b","html_url":"https://github.com/eruptionjs/react-lib","commit_stats":null,"previous_names":["eruptionjs/react-lib"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eruptionjs%2Freact-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eruptionjs%2Freact-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eruptionjs%2Freact-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eruptionjs%2Freact-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eruptionjs","download_url":"https://codeload.github.com/eruptionjs/react-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501917,"owners_count":21114681,"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-11-06T01:18:08.931Z","updated_at":"2025-04-12T00:49:06.599Z","avatar_url":"https://github.com/eruptionjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eruption🌋 React Lib\n\nYour production go-to model to easily publish a lib/components to npm and github package registry, for your React/Typescript projects.\n\n## how to use\n\nThe project is ready to be used as a template for your own lib. You can clone it or use the Eruption🌋 CLI to create a new project (available soon).\n\n## how to develop\n\nThe project have two separated structures: `lib` is for the lib itself where the components will be developed and will bundle to publish into github/npm, and the `src` where you should use as your usual development mode to develop the library itself. Since we use absolute paths to import the components, you can import the libs/components using `@lib/` prefix, the same way you would do with `@src/`.\n\n## how to publish\n\nBefore you publish, don't forget to change the lib name in the `package.json` file. The name is the one that will be used to install the package in other projects. Also, don't forget to change the `package.json` version, description and author, too. Homepage, bugs and repository, should be changed as well and reflect the repository that your project lives in (aka github).\n\nA friendly reminder that you can't publish a package with the same version twice, and you can't publish a private package to npm with a free account. In addition, to publish via github, you need to have a personal access token with the right access to publish packages. You can create one in your github account settings. Check the docs for further details.\n\nThis project takes a lot of opinions of how a lib should be structured, developed and published. If you want to change the structure, take your time to understand each config under `vite.config.ts` and `tsconfig.json` files. You should be able to follow with the official vite and rollup docs.\n\n## how to publish to github/npm\n\n- run\n\n```bash\nnpm login --scope=@\u003cusername\u003e --registry=https://npm.pkg.github.com\n```\n\n- authenticate with your github `username` and your `personal access token`:\n\n```bash\nUsername: \u003cusername\u003e\nPassword: \u003cpersonal access token\u003e\n```\n\n- If you have the right access with your token, you can then publish your package:\n\n```bash\nnpm publish\n```\n\nThen, if everything if your access is right, ti will be published to your github package registry and be available to install as a dependency in other projects:\n\n```bash\nnpm install @\u003cusername\u003e/\u003cpackage-name\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feruptionjs%2Freact-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feruptionjs%2Freact-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feruptionjs%2Freact-lib/lists"}