{"id":28455593,"url":"https://github.com/primer/react-toolchain","last_synced_at":"2025-07-22T09:10:11.298Z","repository":{"id":39194532,"uuid":"484013663","full_name":"primer/react-toolchain","owner":"primer","description":"Toolchain to help in building React components with @primer/react","archived":false,"fork":false,"pushed_at":"2025-06-24T05:18:06.000Z","size":2787,"stargazers_count":8,"open_issues_count":9,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-27T02:38:59.267Z","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/primer.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-21T10:52:49.000Z","updated_at":"2025-04-14T15:21:42.000Z","dependencies_parsed_at":"2025-03-13T16:24:34.720Z","dependency_job_id":"8df33ea6-b481-464b-bd64-e738e9960567","html_url":"https://github.com/primer/react-toolchain","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/primer/react-toolchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Freact-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Freact-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Freact-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Freact-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primer","download_url":"https://codeload.github.com/primer/react-toolchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Freact-toolchain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266463541,"owners_count":23932902,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-06-06T22:09:50.587Z","updated_at":"2025-07-22T09:10:11.166Z","avatar_url":"https://github.com/primer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://octodex.github.com/images/manufacturetocat.png\" height=\"200px\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cb\u003eToolchain to help build React components with Primer\u003c/b\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/badge/maturity-proof--of--concept-d85151?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/package-json/v/primer/react-toolchain?style=flat-square\"/\u003e\n\u003c/p\u003e\n\n\u0026nbsp;\n\n### Requirements\n\n- webpack 5+\n\n\u0026nbsp;\n\n## Setup\n\n```\nnpm install @primer/react-toolchain --save-dev\n```\n\n### Storybook\n\nStep 1. Add this script to your `package.json`:\n\n```diff\n{\n  scripts: {\n    \"start\": \"webpack\",\n    \"test\": \"jest\",\n+   \"storybook\": \"toolchain storybook\",\n+   \"storybook:build\": \"toolchain storybook:build\"\n  }\n}\n```\n\nStep 2. Create a `ComponentName.stories.tsx` file\n\nWe recommend putting this file next to the component.\n\n```jsx\nimport { DatePicker } from './date-picker';\n\nexport default {\n  title: 'Common components/Datepicker'\n};\n\nexport const SimpleDatePicker = () =\u003e {\n  return \u003cDatePicker variant=\"single\" value={new Date()} /\u003e;\n};\n```\n\n[Learn more about stories from the Storybook docs](https://storybook.js.org/docs/react/get-started/whats-a-story)\n\n\u0026nbsp;\n\nYou're good to go! Run `npm run storybook`.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch4\u003eCustomise storybook\u003c/h4\u003e\u003c/summary\u003e\n\nIf you need to customize your storybook config, create `.storybook` directory in the root of your repository with the following files:\n\n1. `main.js`\n\n   ```js\n   const defaultConfig = require('@primer/react-toolchain/storybook/main');\n   const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');\n\n   module.exports = {\n     // extend default config\n     ...defaultConfig,\n\n     // remember to include default properties while extending\n     addons: [...defaultConfig.addons, 'storybook-addon-performance/register'],\n\n     // need to customise webpack config because we use custom resolvers for helpers/util\n     webpackFinal: (webpackConfig) =\u003e {\n       webpackConfig.resolve.plugins = [new TsconfigPathsPlugin({ baseUrl: './src/client' })];\n       return config;\n     }\n   };\n   ```\n\n2. `preview.js`\n\n   ```js\n   // step 1: export defaults\n   export * from '@primer/react-toolchain/storybook/preview';\n\n   // (optional) step 2: customise and overwrite\n   import { decorators } from '@primer/react-toolchain/storybook/preview';\n   import { withPerformance } from 'storybook-addon-performance';\n\n   decorators.push(withPerformance);\n   export { decorators };\n   ```\n\n   \u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimer%2Freact-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimer%2Freact-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimer%2Freact-toolchain/lists"}