{"id":28092771,"url":"https://github.com/ericlee33/create-compositive-react-app-cli","last_synced_at":"2025-05-13T13:42:44.601Z","repository":{"id":53823531,"uuid":"354066793","full_name":"ericlee33/create-compositive-react-app-cli","owner":"ericlee33","description":"The React family bucket integrates scaffolding. On the basis of create-react-app, optional configuration items such as React-Router, Redux, Linter/Formatter, etc. are added, which can quickly create react projects.","archived":false,"fork":false,"pushed_at":"2022-08-11T17:12:08.000Z","size":256,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T04:06:49.175Z","etag":null,"topics":["cli","nodejs","react","react-router","redux"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ericlee33.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":"2021-04-02T16:00:15.000Z","updated_at":"2024-08-24T22:52:02.000Z","dependencies_parsed_at":"2022-09-01T09:40:17.624Z","dependency_job_id":null,"html_url":"https://github.com/ericlee33/create-compositive-react-app-cli","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/ericlee33%2Fcreate-compositive-react-app-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlee33%2Fcreate-compositive-react-app-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlee33%2Fcreate-compositive-react-app-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlee33%2Fcreate-compositive-react-app-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericlee33","download_url":"https://codeload.github.com/ericlee33/create-compositive-react-app-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253951984,"owners_count":21989586,"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","nodejs","react","react-router","redux"],"created_at":"2025-05-13T13:42:43.956Z","updated_at":"2025-05-13T13:42:44.589Z","avatar_url":"https://github.com/ericlee33.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-compositive-react-app-cli\n\n\u003e [npm 源地址：](https://www.npmjs.com/package/create-compositive-react-app-cli)同 git 仓库名\n\n\u003e https://juejin.cn/post/6951330074905804814\n\n## Introduction 脚手架介绍\n\n减少从 0 到 1 搭建项目的成本，快速开发项目\n\n在`create-react-app` `v4.0.3`脚手架基础上，增加了如下项目配置可选项\n\n- `React-Redux + Redux-Thunk + Redux-Logger`\n- `React-Router` (可选择`History`, `Hash`模式)\n- `Linter / Formatter` （目前提供了`Eslint + EditorConfig + Prettier + CommitLint`）\n\n完成模板创建后，自动安装依赖。\n\n## Getting started 快速使用\n\n- 推荐使用\n  `npx create-compositive-react-app-cli init \u003cyour project name\u003e`\n- 也可使用\n  `npm i -g create-compositive-react-app-cli`\n  `ccra init \u003cyour project name\u003e`\n\n\u003cimg src=\"https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c75963c534e64535afe2f46510bca13b~tplv-k3u1fbpfcp-watermark.image\"\u003e\n\n\u003cimg src=\"https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ae972b5087ff4749a7c784aa274bdaa9~tplv-k3u1fbpfcp-watermark.image\"\u003e\n\n## Usage 使用方法\n\n##### 快速搭建项目\n\n`ccra init \u003cname\u003e`\n\n配置项有 3 种可选项:\n\n- Redux\n- React-Router (可选择 History, Hash 模式)\n- Linter / Formatter （目前提供了 Eslint + EditorConfig + Prettier + CommitLint）\n\n##### 快速创建 Page、Component 模板\n\n`ccra create`\n\n可以在 **CLI** 中自行选择创建 **Page** 或 **Component**\n输入 **name** 后即可完成模板自动创建\n\n## Template Structures 模板结构\n\n```\n├─.editorconfig\n├─.eslintignore\n├─.eslintrc.js\n├─.prettierrc.js\n├─README.md\n├─commitlint.config.js\n├─package.json\n├─src\n|  ├─App.js\n|  ├─index.js\n|  ├─views\n|  |   ├─login\n|  |   |   ├─login.jsx\n|  |   |   └login.module.scss\n|  ├─utils\n|  |   └index.js\n|  ├─styles\n|  |   ├─index.scss\n|  |   ├─modules\n|  |   |    ├─function.scss\n|  |   |    ├─global.scss\n|  |   |    ├─mixin.scss\n|  |   |    └variables.scss\n|  ├─store\n|  |   └store.js\n|  ├─routes\n|  |   ├─routes.jsx\n|  |   └routesConfig.jsx\n|  ├─reducers\n|  |    ├─reducers.js\n|  |    ├─module\n|  |    |   └auth.js\n|  ├─layouts\n|  |    ├─BasicLayout\n|  |    |      ├─BasicLayout.jsx\n|  |    |      └BasicLayout.module.scss\n|  ├─constants\n|  |     └constants.js\n|  ├─components\n|  |     ├─Widget\n|  |     |   ├─widget.jsx\n|  |     |   └widget.module.scss\n|  ├─actions\n|  |    ├─actions.js\n|  |    ├─module\n|  |    |   └auth.js\n├─public\n|   └index.html\n```\n\n## Features 功能介绍\n\n- 一键快速创建`Page`组件\n- 一键快速创建`Components`组件\n- 在`ccra init \u003cname\u003e`进行初始化项目时，通过`Inquirer`库的功能，提供给用户各类可选项，可以根据用户所需配置，进行项目自动化构建。\n  - 注：状态管理暂时仅提供`Redux`模板\n  - 路由管理提供`React-Router` `v5`模板\n- 自动安装所需要的`@types`文件，即便用户使用`JavaScript`进行开发，也能在`vscode IDE`下得到函数提示支持\n\n## Contact me 联系我\n\nwechat:`actuallys`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlee33%2Fcreate-compositive-react-app-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlee33%2Fcreate-compositive-react-app-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlee33%2Fcreate-compositive-react-app-cli/lists"}