{"id":20986831,"url":"https://github.com/karmaniverous/react-component-npm-package-template","last_synced_at":"2026-02-24T02:31:41.794Z","repository":{"id":44827348,"uuid":"513049128","full_name":"karmaniverous/react-component-npm-package-template","owner":"karmaniverous","description":"An ES6 React component NPM package project template featuring front \u0026 back end test support, automated API docs, release management \u0026 more!","archived":false,"fork":false,"pushed_at":"2024-08-12T05:58:40.000Z","size":2035,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-12T07:03:23.134Z","etag":null,"topics":["chai","mocha","npm","package","react","release","template","testing"],"latest_commit_sha":null,"homepage":"https://karmanivero.us/blog/react-component-npm-package-template/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karmaniverous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["karmaniverous"]}},"created_at":"2022-07-12T07:51:59.000Z","updated_at":"2024-08-12T05:58:43.000Z","dependencies_parsed_at":"2024-08-12T07:07:13.480Z","dependency_job_id":null,"html_url":"https://github.com/karmaniverous/react-component-npm-package-template","commit_stats":null,"previous_names":[],"tags_count":6,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Freact-component-npm-package-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Freact-component-npm-package-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Freact-component-npm-package-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Freact-component-npm-package-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karmaniverous","download_url":"https://codeload.github.com/karmaniverous/react-component-npm-package-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225303983,"owners_count":17453037,"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":["chai","mocha","npm","package","react","release","template","testing"],"created_at":"2024-11-19T06:15:01.609Z","updated_at":"2024-11-19T06:15:02.105Z","avatar_url":"https://github.com/karmaniverous.png","language":"JavaScript","funding_links":["https://github.com/sponsors/karmaniverous"],"categories":[],"sub_categories":[],"readme":"# React Component NPM Package Template\r\n\r\nYou wrote a sweet React component! Releasing it on [NPM](https://www.npmjs.com/)\r\nseems like the obvious next step. Right?\r\n\r\nTry it. Not as easy to do from scratch as you might think.\r\n\r\nSo here's a plug-and-play NPM package template that offers the following\r\nfeatures:\r\n\r\n- Support for the latest ES6 + JSX goodies with\r\n  [`eslint`](https://www.npmjs.com/package/eslint) _uber alles_.\r\n\r\n- Automated [`lodash`](https://www.npmjs.com/package/lodash) cherry-picking with\r\n  [`babel-plugin-lodash`](https://www.npmjs.com/package/babel-plugin-lodash).\r\n\r\n- Front \u0026 back-end testing with [`mocha`](https://www.npmjs.com/package/mocha),\r\n  [`chai`](https://www.npmjs.com/package/chai), and the\r\n  [React Testing Library](https://www.npmjs.com/package/@testing-library/react).\r\n  Includes examples and a sweet testing console!\r\n\r\n- Code formatting at every save \u0026 paste with\r\n  [`prettier`](https://www.npmjs.com/package/prettier).\r\n\r\n- Automated documentation of your API with\r\n  [`jsdoc-to-markdown`](https://www.npmjs.com/package/jsdoc-to-markdown) and\r\n  assembly of your README with\r\n  [`concat-md`](https://www.npmjs.com/package/concat-md).\r\n\r\n- One-button release to GitHub \u0026 publish to NPM with\r\n  [`release-it`](https://www.npmjs.com/package/release-it).\r\n\r\n**[Click here](https://karmanivero.us/blog/react-component-npm-package-template/)\r\nfor full template documentation \u0026 instructions!**\r\n\r\n_If you want to create a non-React NPM package, try my regular\r\n[NPM Package Template](https://github.com/karmaniverous/npm-package-template)\r\ninstead!_\r\n\n# API Documentation\r\n\r\n```js\r\nimport { MyComponent } from '@karmaniverous/react-component-npm-package-template`;\r\n```\r\n\r\n\u003ca name=\"MyComponent\"\u003e\u003c/a\u003e\n\n## MyComponent()\nWraps children in an `h1` tag with a specified `data-test-id` attribute.\rUsing lodash purely to demonstrate Babel cherry-picking.\n\n**Kind**: global function  \n**Component**:   \n**Example**  \n```js\n\u003cMyComponent testid=\"testid\"\u003eHello, world!\u003c/MyComponent\u003e;\r\r// \u003ch1 data-testid=\"testid\"\u003eHello, world!\u003c/h1\u003e\n```\n\n---\r\n\r\nSee more great templates and other tools on\r\n[my GitHub Profile](https://github.com/karmaniverous)!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Freact-component-npm-package-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarmaniverous%2Freact-component-npm-package-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Freact-component-npm-package-template/lists"}