{"id":19318304,"url":"https://github.com/feflow/generator-redux-startkit","last_synced_at":"2025-04-22T17:31:01.901Z","repository":{"id":57248664,"uuid":"160183047","full_name":"feflow/generator-redux-startkit","owner":"feflow","description":"A generator for multiple-page application with react and redux.","archived":false,"fork":false,"pushed_at":"2018-12-23T19:00:25.000Z","size":310,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T22:05:57.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/feflow.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":"2018-12-03T11:50:38.000Z","updated_at":"2019-06-15T08:10:00.000Z","dependencies_parsed_at":"2022-08-24T16:50:46.024Z","dependency_job_id":null,"html_url":"https://github.com/feflow/generator-redux-startkit","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/feflow%2Fgenerator-redux-startkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feflow%2Fgenerator-redux-startkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feflow%2Fgenerator-redux-startkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feflow%2Fgenerator-redux-startkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feflow","download_url":"https://codeload.github.com/feflow/generator-redux-startkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250287456,"owners_count":21405617,"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-10T01:18:05.801Z","updated_at":"2025-04-22T17:31:01.353Z","avatar_url":"https://github.com/feflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![npm version](https://badge.fury.io/js/generator-redux-startkit.svg)](https://badge.fury.io/js/generator-redux-startkit)\n[![](https://img.shields.io/travis/feflow/generator-redux-startkit.svg)](https://travis-ci.com/feflow/generator-redux-startkit)\n[![codecov](https://codecov.io/gh/feflow/generator-redux-startkit/branch/master/graph/badge.svg)](https://codecov.io/gh/feflow/generator-redux-startkit)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n# generator-redux-startkit\nA generator for multiple-page application with react and redux.\n\n基于react和redux的多页面项目模板。用于[feflow](http://www.feflowjs.org/zh-cn/docs/)，依赖构建器[builder-webpack4](https://github.com/feflow/builder-webpack4)。\n\n# 快速开始\n\n``` bash\n## 安装feflow\n$ npm install feflow-cli -g\n## 安装脚手架\n$ feflow install generator-redux-startkit\n## 初始化项目\n$ feflow init\n# 输入相关参数\n$ cd \u003cfolder\u003e\n## 本地开发\n$ feflow dev\n# 访问默认端口http://127.0.0.1:8001\n```\n\n# feflow依赖\n\n本项目依赖`feflow@0.15.0`或以上版本，如果你之前已安装过旧版feflow，在`feflow dev`时可能会出现以下错误：\n\n```\nCannot destructure property 'createHash' of 'undefined' or 'null'.\n```\n\n如果出现这种情况，可以采用如下操作进行修复：\n\n```bash\n## 进入.feflow目录\ncd ~/.feflow\n## 清空node_modules并重新安装构建器\nrm -rf node_modules\nnpm install builder-webpack4 --global-style\n## 在项目中重新运行feflow\ncd your_project\nfeflow dev\n```\n\n# 项目规范\n\n## 目录结构\n\n本项目采用多页面、共模块的目录结构。可以利用到React/Redux的开发效率及可读性，也适合于在app中进行多个内嵌页面的hybird开发。\n\n所有页面在`src/pages`下，每个页面都遵循[Rails-style](https://redux.js.org/faq/codestructure#what-should-my-file-structure-look-like-how-should-i-group-my-action-creators-and-reducers-in-my-project-where-should-my-selectors-go)目录结构，下面以`index`页面为例，介绍一个页面中的目录结构：\n\n```\n└── index\n    ├── actions // 存放action\n    ├── assets // 图片等静态资源\n    ├── components // 页面公用组件\n    ├── connect // connect相关\n    ├── container // 容器\n    ├── index.html\n    ├── init.js // 启动入口js\n    ├── reducers // reducers\n    ├── root // 根组件，处理热更新\n    └── stores // stores\n```\n\n## 代码规范\n\n本项目采用`Eslint`+`Prettier`代码风格，对于代码格式检查比较严格，如果遇到不知道如何解决的Eslint报错，可以使用`eslint . --fix`进行代码格式化，如果使用vscode，`command + shift + P` 输入`Format Document`执行代码自动格式化。\n\n## CDN配置\n\n项目默认配置了`react`和`react-dom`的cdn，在`feflow.json`中可以对`external`进行修改。\n\n```\n\"externals\": [\n    {\n        \"module\": \"react\",\n        \"entry\": \"https://unpkg.com/react@16/umd/react.development.js\",\n        \"global\": \"React\"\n    },\n    {\n        \"module\": \"react-dom\",\n        \"entry\": \"https://unpkg.com/react-dom@16/umd/react-dom.development.js\",\n        \"global\": \"ReactDOM\"\n    }\n]\n```\n\n# 如何贡献\n\n1. 从目前已经存在的issue或者提出一个新的issue去讨论新的特性或者存在的bug。\n2. 在Github上Fork [仓库](https://github.com/feflow/generator-redux-startkit)，然后在master或者其它分支上开始进行您的修改。\n3. 编写测试用例表明某个bug被修复掉了或者新的特性可以正常工作。\n4. 提交PR，如果通过了测试并且覆盖率没问题，会进行Code Review并合并。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeflow%2Fgenerator-redux-startkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeflow%2Fgenerator-redux-startkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeflow%2Fgenerator-redux-startkit/lists"}