{"id":19963133,"url":"https://github.com/reactstrap/component-template","last_synced_at":"2025-08-20T14:32:42.321Z","repository":{"id":11300990,"uuid":"69130396","full_name":"reactstrap/component-template","owner":"reactstrap","description":"Build, Document, Release \u0026 Publish React Components","archived":false,"fork":false,"pushed_at":"2023-01-24T17:27:39.000Z","size":2043,"stargazers_count":119,"open_issues_count":24,"forks_count":35,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-05T22:21:36.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://reactstrap.github.io/component-template","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/reactstrap.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":"2016-09-24T22:15:12.000Z","updated_at":"2024-05-17T16:45:12.000Z","dependencies_parsed_at":"2023-02-13T23:45:36.497Z","dependency_job_id":null,"html_url":"https://github.com/reactstrap/component-template","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactstrap%2Fcomponent-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactstrap%2Fcomponent-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactstrap%2Fcomponent-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactstrap%2Fcomponent-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactstrap","download_url":"https://codeload.github.com/reactstrap/component-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230431103,"owners_count":18224655,"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-13T02:14:49.120Z","updated_at":"2024-12-19T12:11:45.452Z","avatar_url":"https://github.com/reactstrap.png","language":"JavaScript","readme":"# component-template [![Build Status](https://travis-ci.org/reactstrap/component-template.svg?branch=master)](https://travis-ci.org/reactstrap/component-template)\n\nBuild, Document, Release \u0026 Publish React Components for [reactstrap](https://github.com/reactstrap/reactstrap) with this [Component Template](https://github.com/reactstrap/component-template).\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\n## [Documentation](https://reactstrap.github.io/component-template/)\n\nTo start using the example npm module `component-template`, check out the [documentation](https://reactstrap.github.io/component-template/).\n\n## Developing with Component Template\n\nLooking to build your own components? Fork this repo and proceed with the following documentation.\n\n### Getting started\n\nTo begin, install dependencies with\n\n```\nnpm install\n```\n\nTo run a local server with `create-react-app`, run:\n\n```\nnpm start\n```\n\nA new browser window should open up with the following url: [http://localhost:3000](http://localhost:3000)\n\n### Testing components\n\nTesting is provided via [create-react-app](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#testing-components) which includes the [jest](https://facebook.github.io/jest/) test runner. [Enzyme](http://airbnb.io/enzyme/) is also added to enable better integration testing of components via [mount](http://airbnb.io/enzyme/docs/api/mount.html).\n\nExecute the following command to run tests. Read more about that [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#command-line-interface).\n\n```sh\nnpm run test\n```\n\nTo also see test coverage when running tests, execute the following command:\n\n```sh\nnpm test -- --coverage\n```\n\n### Adding your own components\n\nCurrently the example component shipped in this project is `HelloWorld`. To add your own components, replace HelloWorld with your own named component and tests.\n\n#### Notes\n\n- Component source code should live in `/src/components`\n- Be sure to export your components here `/src/components/index.js`\n- When published to npm, the `main` script in package.json will be available at `lib/index.js` thanks to the `prebuild` task\n- Changelogs are important for communicating to users what features, fixes and breaking changes have been shipped. This project uses the [angular commit convention](https://github.com/angular/angular.js/blob/cf241c425b20569e4c7909bfbd379f5c07694288/CONTRIBUTING.md#-git-commit-guidelines) as standard for creating readable and machine parseable commit messages.\n\n### Release Flow\n\nIncluded in this project are a few scripts to help document, release and publish a react component. Before proceeding, make sure the `name`, `version`, `description`, and `repository` in `package.json` are updated to properly define your own component.\n\nOnce your components are added and tested, use the following steps to release to npm.\n\n#### Create Release branch\n\nFirst, run the `create-release-branch` script locally, which takes 1 argument, the release version. The release version can be a specific semantic version or it accepts `patch`, `minor`, `major` to automatically increment the current release version and update the changelog. After the script is run, a branch will be pushed to the repo.\n\n```sh\n# RELEASE_VERSION: \"1.0.0\", patch, minor, major\nRELEASE_VERSION=0.2.0\nnpm run create-release-branch -- $RELEASE_VERSION\n```\n\nWith the branch pushed to github, you can now manually create the pr.\n\n#### Publish Docs\n\nFirst, update the npm task `gh-pages`, to set the proper `REACT_APP_GH_PAGES_PATH` for your project. Ex: `https://reactstrap.github.io/component-template` project would be `component-template`. No need for the trailing or leading slash.\n\nFollow the next sections to publish locally or via Travis CI.\n\n##### Without CI\n\nWith the `REACT_APP_GH_PAGES_PATH` path updated, run the `deploy-docs` script to compile the production version of your docs and push those changes to the `gh-pages` branch of your repo.\n\n```sh\nnpm run deploy-docs\n```\n\n##### via Travis CI\n\nComing soon\n\n#### Publish Release\n\nFirst, be sure to [signup for npm](https://docs.npmjs.com/getting-started/publishing-npm-packages#creating-a-user) if you haven't or run `npm login` with your existing credentials.\n\nNext, run the `publish-release` task which will pull the latest changes, compile the components, tag the current commit as the `version` in `packge.json`. push the tags to github and finally will run `npm publish`. Check the [publish-release](/scripts/publish-release) script for more info.\n\n```sh\nnpm run publish-release\n```\n\n## Missing Something\n\nFeel free to create an [issue](https://github.com/reactstrap/component-template/issues/new) or PR.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactstrap%2Fcomponent-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactstrap%2Fcomponent-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactstrap%2Fcomponent-template/lists"}