{"id":4821,"url":"https://github.com/diegohaz/generact","last_synced_at":"2025-05-15T10:06:05.612Z","repository":{"id":57246005,"uuid":"93265134","full_name":"diegohaz/generact","owner":"diegohaz","description":"Generate React components by replicating your own","archived":false,"fork":false,"pushed_at":"2019-03-08T17:18:29.000Z","size":231,"stargazers_count":1477,"open_issues_count":10,"forks_count":64,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-14T15:02:31.168Z","etag":null,"topics":["cli","create-react-app","generator","react","react-boilerplate","react-starter-kit"],"latest_commit_sha":null,"homepage":"https://git.io/generact","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/diegohaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-06-03T17:57:58.000Z","updated_at":"2025-03-30T00:43:45.000Z","dependencies_parsed_at":"2022-08-24T16:31:35.876Z","dependency_job_id":null,"html_url":"https://github.com/diegohaz/generact","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fgeneract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fgeneract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fgeneract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fgeneract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegohaz","download_url":"https://codeload.github.com/diegohaz/generact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319718,"owners_count":22051072,"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":["cli","create-react-app","generator","react","react-boilerplate","react-starter-kit"],"created_at":"2024-01-05T20:17:25.217Z","updated_at":"2025-05-15T10:06:00.551Z","avatar_url":"https://github.com/diegohaz.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/3068563/26764665/8616e6d6-4941-11e7-95eb-e9778ab3a0c5.png\" alt=\"generact\" width=\"300\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/diegohaz/nod\"\u003e\u003cimg alt=\"Generated with nod\" src=\"https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/generact\"\u003e\u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/generact.svg?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/diegohaz/generact\"\u003e\u003cimg alt=\"Build Status\" src=\"https://img.shields.io/travis/diegohaz/generact/master.svg?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/diegohaz/generact/branch/master\"\u003e\u003cimg alt=\"Coverage Status\" src=\"https://img.shields.io/codecov/c/github/diegohaz/generact/master.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eTool for generating React components by replicating your own.\u003c/em\u003e\u003cbr /\u003e\n  \u003cem\u003eIt's intended to work no matter how your file structure is.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/3068563/27687316-bb5bd832-5cac-11e7-9761-c489e5a3a9f0.gif\" alt=\"generact\" width=\"800\" /\u003e\n  \u003cbr\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eAre you looking for a VS Code extension? Try \u003ca href=\"https://github.com/Dennitz/vscode-generact\"\u003evscode-generact\u003c/a\u003e.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003e It already works with boilerplates such as [create-react-app](https://github.com/facebookincubator/create-react-app) (above example), [react-boilerplate](https://github.com/react-boilerplate/react-boilerplate), [react-starter-kit](https://github.com/kriasoft/react-starter-kit) and [ARc](https://arc.js.org) (ok, I'm self-promoting here 😆). So, most likely this will work for you with your current project.\n\n## Install\n\n```sh\n$ npm install -g generact\n```\n\n## Motivation\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.facebook.com/groups/228321510706889/permalink/614412725431097/\"\u003e\u003cimg alt=\"Facebook poll\" src=\"https://cloud.githubusercontent.com/assets/3068563/26765726/79542d66-4958-11e7-91a1-19d55b766f12.png\" height=\"250\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/diegohaz\"\u003e\u003cimg alt=\"Facebook poll\" src=\"https://cloud.githubusercontent.com/assets/3068563/26765748/18e53fd2-4959-11e7-93c9-ecc2452ea10e.png\" height=\"250\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nI usually work on different projects with different file structures. Whenever I needed to create a new component, the approach I used was to copy and paste a similar or very basic component and start writing the new component from it. Talking with other developers, this seemed like a very common process.\n\nHowever, I've never been satisfied with that. It looked like I was doing a robot job. So why not create a robot to do that?\n\n## Usage\n\n```sh\n$ cd ~/my-projects/my-react-project\n$ generact\n```\n\nThat will scan `~/my-projects/my-react-project` for components to replicate.\n\n### Specify another root path to find components\n\nIf you want to replicate components from another directory, you can do that by using `root` option:\n\n```sh\n$ generact --root relative/or/absolute/path/to/any/react/project\n```\n\n### Specify component path to replicate\n\n`generact` will probably find all component files inside the root path automagically (using [list-react-files](https://github.com/diegohaz/list-react-files)). But, if it doesn't, you can still pass in the component path:\n\n```sh\n$ generact relative/or/absolute/path/to/component.js\n```\n\n## Contributing\n\nPRs are welcome.\n\nUse `npm run watch` while coding.\n\n## License\n\nMIT © [Diego Haz](https://github.com/diegohaz)\n","funding_links":[],"categories":["Utilities","JavaScript"],"sub_categories":["Other Platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohaz%2Fgeneract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegohaz%2Fgeneract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohaz%2Fgeneract/lists"}