{"id":15823955,"url":"https://github.com/dhaiwat10/react-india-package-example","last_synced_at":"2025-04-01T08:51:14.406Z","repository":{"id":57212096,"uuid":"421284948","full_name":"Dhaiwat10/react-india-package-example","owner":"Dhaiwat10","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-03T08:59:55.000Z","size":312,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T08:24:13.236Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dhaiwat10.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}},"created_at":"2021-10-26T04:54:29.000Z","updated_at":"2021-11-03T08:59:57.000Z","dependencies_parsed_at":"2022-08-24T22:30:49.714Z","dependency_job_id":null,"html_url":"https://github.com/Dhaiwat10/react-india-package-example","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"sixfootsixdesigns/React-Library-Boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhaiwat10%2Freact-india-package-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhaiwat10%2Freact-india-package-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhaiwat10%2Freact-india-package-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dhaiwat10%2Freact-india-package-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dhaiwat10","download_url":"https://codeload.github.com/Dhaiwat10/react-india-package-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246612442,"owners_count":20805351,"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-10-05T08:24:17.054Z","updated_at":"2025-04-01T08:51:14.379Z","avatar_url":"https://github.com/Dhaiwat10.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Library Boilerplate\n\nThis react library boilerplate uses the following:\n\n- [Typescript](https://www.typescriptlang.org/)\n- [Rollup](https://rollupjs.org/guide/en/)\n- [Prettier](https://prettier.io/)\n- [ESLint](https://eslint.org/)\n- [StyleLint](https://stylelint.io/)\n- [Storybook](https://storybook.js.org/)\n- [SCSS](https://sass-lang.com/)\n- [Jest](https://jestjs.io/)\n- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)\n- [Semantic Release](https://semantic-release.gitbook.io/)\n- [Github Actions](https://github.com/features/actions)\n- [Hygen](https://www.hygen.io/)\n\n## Setup\n\n1. Edit the `package.json` file. Set you app's name, description, version, author, homepage, bugs, and repository fields with the correct information.\n1. Run `yarn` to add all the project's dependencies.\n1. You package.json file version should always be 0.0.0 since Semantic Release will automatically set this upon publishing.\n\n## Basic Folder Structure\n\n```\n├── .storybook\n├── src\n│   ├── components\n|   |   ├── Example\n|   |   |   ├── __tests__\n|   |   |   |   ├── Example.test.tsx\n|   |   |   ├── example.scss\n|   |   |   ├── Example.stories.tsx\n|   |   |   ├── Example.tsx\n|   |   |   ├── index.ts\n|   |   ├── index.ts\n|   ├── index.ts\n├── LICENSE\n├── package.json\n├── README.md\n```\n\n## Add a new component\n\n- You can automatically create a new component using the `yarn component:new` command.\n- Or, you can manually add the new component directory in the `src/components` directory following this folder structure\n\n```\n├── MyComponent\n|   ├── __tests__\n|   |   ├── MyComponent.test.tsx\n|   ├── MyComponent.scss\n|   ├── MyComponent.stories.tsx\n|   ├── MyComponent.tsx\n|   ├── index.ts\n\n```\n\nOnce you have created your new component make sure you have exported it in the `src/components/index.ts` file. Doing so allows the component to be compiled into the final bundle using rollup.\n\n```\n// src/components/index.ts\nexport \\* from './MyComponent';\nexport \\* from './SomeOtherComponent';\n\n```\n\n\u003e You can skip all of this and use the built in component generator. The template for the component is in `_templates/component/with-prompt`. Simply run the following command to automatically create your new component. It will prompt you for the component name and then build out all the files and correct exports.`yarn component:new`\n\nYou can develop your new component using storybook as your playground. Once you have added the `.stories.tsx` file for you new component, you can run `yarn storybook` to start the service.\n\n## Tests\n\n```\n\n$ yarn test\n\n```\n\nWith coverage\n\n```\n\n$ yarn test:coverage\n\n```\n\nWatch\n\n```\n\n$ yarn test:watch\n\n```\n\n## Prettier\n\n```\n\n$ yarn format\n\n```\n\nValidate project formatting\n\n```\n\n$ yarn format:check\n\n```\n\n## Lint\n\n```\n\n$ yarn lint\n\n```\n\n## Storybook\n\n```\n\n$ yarn storybook\n\n```\n\n## Building your library\n\n```\n\n$ yarn build\n\n```\n\nThe build output will go into the `dist` directory\n\n## Github Actions\n\nThis project contains a github action workflow called `ci.yaml`. This workflow runs a job that will test, lint, and build the code. If the code passes and you are on the `master` branch it will also run the publish job to send the new version off to npm.\n\n## Publishing your Library on NPM\n\nOnce you have created an account on NPM create a publish key and add it to your github secrets as `NPM_TOKEN`. You will also need to create another secret called `SEMANTIC_RELEASE_TOKEN`. This token should be a personal access token that has the following scopes: `repo(all)`. [Semantic Release](https://semantic-release.gitbook.io/) will take care of the publishing and versioning for you via the `.github/workflows/ci.yaml` `Publish` job. In addition to publishing to NPM it will also create a new tag and release with commit messages in the repo.\n\n\u003e Note: You will need to update the package.json name property with the correct name your library will be using on npm.\n\n## Committing Code Changes\n\nThe commit messages are critical for allowing the [Semantic Releases](https://semantic-release.gitbook.io/) to work correctly. We use the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) commit message format.\n\nThe commit message should be structured as follows:\n\n```\n\u003ctype\u003e[optional scope]: \u003cdescription\u003e\n\n[optional body]\n\n[optional footer(s)]\n```\n\nAny line of the commit message cannot be longer than 100 characters! This allows the message to be easier\nto read on GitHub as well as in various git tools.\n\n#### Type\n\nMust be one of the following:\n\n- **build**: Changes that affect the build system or external dependencies (this correlates with `PATCH` in semantic versioning)\n- **ci**: Changes to our CI configuration files and scripts (no version changes)\n- **docs**: Documentation only changes (no version changes)\n- **feat**: A new feature (this correlates with `MINOR` in semantic versioning).\n- **fix**: A bug fix (this correlates with `PATCH` in semantic versioning).\n- **perf**: A code change that improves performance (this correlates with `PATCH` in semantic versioning).\n- **refactor**: A code change that neither fixes a bug nor adds a feature (no version changes)\n- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) (no version changes)\n- **test**: Adding missing tests or correcting existing tests (no version changes)\n- **revert**: Reverts a previous commit (this correlates with `PATCH` in semantic versioning).\n\n#### Description\n\nThe Description contains a succinct description of the change:\n\n- use the imperative, present tense: \"change\" not \"changed\" nor \"changes\"\n- don't capitalize the first letter\n- no dot (.) at the end\n\n#### Body (optional)\n\nUse the imperative, present tense: \"change\" not \"changed\" nor \"changes\".\nThe body should include the motivation for the change and contrast this with previous behavior.\n\n#### Footer (optional)\n\nThe footer should contain any information about **Breaking Changes** and is also the place to\nreference GitHub issues that this commit **Closes**.\n\n### Breaking Changes\n\nA commit that has the text `BREAKING CHANGE:` at the beginning of its optional body or footer section introduces a breaking API change (correlating with `MAJOR` in semantic versioning). A BREAKING CHANGE can be part of commits of any type.\n\nshould start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.\n\n### Revert\n\nIf the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit \u003chash\u003e.`, where the hash is the SHA of the commit being reverted.\n\n### Examples\n\n[see examples](https://www.conventionalcommits.org/en/v1.0.0/#examples)\n\n---\n\n## Changelog\n\nThe changelog.md is automatically generated from the following types of commits:\n\n- `feat`\n- `fix`\n- `perf`\n- `revert`\n\nIn addition to these types, any `breaking change` will also be added to the changelog.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhaiwat10%2Freact-india-package-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhaiwat10%2Freact-india-package-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhaiwat10%2Freact-india-package-example/lists"}