{"id":25638333,"url":"https://github.com/buvsethia/react-quick-templates","last_synced_at":"2026-04-15T19:37:16.432Z","repository":{"id":57342966,"uuid":"72020330","full_name":"BuvSethia/react-quick-templates","owner":"BuvSethia","description":"Save some typing by auto-generating React component skeletons","archived":false,"fork":false,"pushed_at":"2017-06-02T04:41:34.000Z","size":34,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-25T22:21:23.703Z","etag":null,"topics":["automation","batch-insert","command-line-tool","component","component-skeleton","generation","javascript","nodejs","npm-module","react","reactjs","skeleton","templates"],"latest_commit_sha":null,"homepage":"","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/BuvSethia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-26T16:03:21.000Z","updated_at":"2017-02-27T22:13:24.000Z","dependencies_parsed_at":"2022-09-17T06:21:01.785Z","dependency_job_id":null,"html_url":"https://github.com/BuvSethia/react-quick-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuvSethia%2Freact-quick-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuvSethia%2Freact-quick-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuvSethia%2Freact-quick-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuvSethia%2Freact-quick-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BuvSethia","download_url":"https://codeload.github.com/BuvSethia/react-quick-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240259384,"owners_count":19773151,"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":["automation","batch-insert","command-line-tool","component","component-skeleton","generation","javascript","nodejs","npm-module","react","reactjs","skeleton","templates"],"created_at":"2025-02-23T02:24:49.938Z","updated_at":"2025-10-27T15:34:23.072Z","avatar_url":"https://github.com/BuvSethia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-quick-templates\n[![Build Status](https://travis-ci.org/BuvSethia/react-quick-templates.svg?branch=master)](https://travis-ci.org/BuvSethia/react-quick-templates)\n![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)\n\n\nSave some typing by auto-generating simple, ready to go, *linted and tested* React component skeletons. All you have to do is specify the path to the component, and all sub-directories and the component skeleton will be automatically generated for you!\n\n## Installation\n\tnpm install react-quick-templates\n\nThis will install it locally, though if you are planning on using the command line interface, it is probably better to install it globally with:\n\n\tnpm install react-quick-templates -g\n\n## Usage\n\nThe best way to use react-quick-templates is from the command line.\n\n\trqt --help\n\n\tUsage: rqt [options] \u003cfile\u003e [otherFiles...]\n\n\tOptions:\n\n\t\t-h, --help                  output usage information\n\t\t-V, --version               output the version number\n\t\t-t --type \u003ctype\u003e            Container (c) or presentation (p) components\n\t\t-e --esversion \u003cesversion\u003e  ES5 (es5) or ES6 (es6) style components\n\t\t-b --batch                  Create components from a text file with a list of components\n\nreact-quick-templates' CLI defaults to ES6 container components, but you can specify your ES-version and component type by passing in options. For example, the command:\n\n\trqt ./Hi/Sup.js\n\nwill create the following file:\n\n\t//Sup.js, which is inside ./Hi/\n\n\timport React, {PropTypes} from 'react';\n\n\texport default class Sup extends React.Component {\n\t\tconstructor(props) {\n\t\t\tsuper(props);\n\t\t}\n\n\t\trender() {\n\t\t\treturn (\n\t\t\t\t\u003cdiv\u003e\n\n\t\t\t\t\u003c/div\u003e\n\t\t\t);\n\t\t}\n\t}\n\n\tSup.PropTypes = {\n\n\t};\n\n\nBad options will result in the default options being used. You can also pass in multiple filepaths and they will all be created with the same options.\n\n\trqt Hi.js What.jsx ./secret_folder/IsUp.jsx\n\nLike that^^. That command would result in the following directory structure:\n\n\t|-- Hi.js\n\t|-- What.jsx\n\t|-- secret_folder\n\t  |-- IsUp.jsx\n\nEach of those files would be a React component, with the skeleton filled out and ready for your custom code!\n\n## Batch Insert\nWhat if you've architected your entire piece of software, know your directory structure, and want to create a bunch of files with varying options at once? You can batch insert! Simply create a text file like this one:\n\n\t\t//contents of somefile.txt\n\t\thi/welcome/to/rqt.js, p\n\t\twe/have\n\t\tcookies.jsx\n\t\tpie.jsx\n\t\t./partytime.js\n\nThen, run this command:\n\n\t\trqt -b somefile.txt\n\nThis will create the following directory structure, with each file being a React component skeleton meeting your specifications!\n\n\t\t|-hi\n\t\t |-welcome\n\t\t  |-to\n\t\t   |-rqt.js\n\t\t|-we\n\t\t |-have\n\t\t  |-cookies.jsx\n\t\t  |-pie.jsx\n\t\t|-partytime.js\n\n### Batch Insert File Syntax\n\nA line of the txt file you specify can be read in one of two ways: as a filepath or as a partial path. If a line contains a .js, .jsx, .ts, or .tsx file extension, it is read as a filepath. If not, it is read as a partial path.\n\n#### Filepath\n\nIf a line is a filepath, a file will be created at that location using the settings you specify. A filepath line can also have a \"p\" or \"c\", comma separated from the filepath, to create a specific component type:\n\n\tpath/to/File.jsx, p\n\nIf you don't specify a component type, the default one will be used. You can use react-quick-templates' command line options to specify what the default should be.\n\n#### Partial Path\n\nIf a line doesn't have a file extension in it, it is treated as a partial path. When you specify a partial path, every filepath specified after the partial path will have the partial path appended to the front of it. This is useful for when you have multiple files going inside the same directory.\n\n\tpartial/path\n\tfile1.js\n\tfile2.js\n\nThe above file would result in the following:\n\n\t|-partial\n\t |-path\n\t  |-file1.js\n\t  |-file2.js\n\nYou can overwrite the partial path in one of two ways: by specifying a new one, or by putting a ./ in front of a file path. The former will overwrite the partial path to whatever your specified, while the latter will create the file you specified and reset the partial path to the current directory.\n\n\tpartial/path1\n\tafile.js, p\n\tpartial/path2\n\tanotherfile.js, c\n\t./incurrentdir.js\n\nThe above would result in the following:\n\n\t|-partial\n \t |-path1\n\t  |-afile.js\n\t|-partial\n\t |-path2\n\t  |-anotherfile.js\n\t|-incurrentdir.js\n\n### Batch Insert Command Line Options\n\nIn order to use batch insert, pass -b or --batch as a command line option. Batch insert also uses the --esversion and --type options to specify what kind of skeletons to create. Use the --esversion option to specify if the skeletons should be ES5 or ES6 and use the --type option to state what the component type should be by default if it isn't specified inside the txt file.\n\nFor example, the following command will create ES5 components with container components as the default type:\n\n\trqt -b -e es5 -t c batch.txt\n\nIf you don't explicitly provide options, the version will be set to ES6 and the default component type will be set to container (c).\n\n## Issues\nIf you run into any issues using react-quick-templates or have any feature suggestions, drop an issue or a pull request and I'll take a look at it!\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuvsethia%2Freact-quick-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuvsethia%2Freact-quick-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuvsethia%2Freact-quick-templates/lists"}