{"id":13509139,"url":"https://github.com/ShuyunFF2E/ccms-components","last_synced_at":"2025-03-30T13:31:39.290Z","repository":{"id":48040596,"uuid":"59626104","full_name":"ShuyunFF2E/ccms-components","owner":"ShuyunFF2E","description":"数云PC  angular1.x 组件库 （不再维护更新）","archived":false,"fork":false,"pushed_at":"2021-08-10T10:51:47.000Z","size":4851,"stargazers_count":51,"open_issues_count":2,"forks_count":42,"subscribers_count":17,"default_branch":"dev","last_synced_at":"2024-09-20T05:18:33.321Z","etag":null,"topics":["angularjs","ccm","ui-components"],"latest_commit_sha":null,"homepage":"http://cloud-angular.shuyun.com/demos/index.html","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/ShuyunFF2E.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":"2016-05-25T02:57:56.000Z","updated_at":"2021-08-10T10:51:07.000Z","dependencies_parsed_at":"2022-08-12T17:20:37.108Z","dependency_job_id":null,"html_url":"https://github.com/ShuyunFF2E/ccms-components","commit_stats":null,"previous_names":[],"tags_count":208,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShuyunFF2E%2Fccms-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShuyunFF2E%2Fccms-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShuyunFF2E%2Fccms-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShuyunFF2E%2Fccms-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShuyunFF2E","download_url":"https://codeload.github.com/ShuyunFF2E/ccms-components/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222552608,"owners_count":17002119,"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":["angularjs","ccm","ui-components"],"created_at":"2024-08-01T02:01:03.488Z","updated_at":"2024-11-01T09:30:46.535Z","avatar_url":"https://github.com/ShuyunFF2E.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# CCMS Components\n[![Build Status](https://img.shields.io/travis/ShuyunFF2E/ccms-components/master.svg?style=flat-square)](https://travis-ci.org/ShuyunFF2E/ccms-components) \n[![npm version](https://img.shields.io/npm/v/ccms-components.svg?style=flat-square)](https://www.npmjs.com/package/ccms-components)\n[![npm downloads](https://img.shields.io/npm/dt/ccms-components.svg?style=flat-square)](https://www.npmjs.com/package/ccms-components)\n[![coverage](https://img.shields.io/codecov/c/github/ShuyunFF2E/ccms-components/dev.svg?style=flat-square)](https://www.npmjs.com/package/ccms-components)\n\n[组件 API 文档](http://shuyunff2e.github.io/ccms-components/components/)\n\n开发指南 [Angular1.x + ES6 开发风格指南](https://github.com/kuitos/kuitos.github.io/issues/34) [ccms开发指南](https://github.com/ShuyunFF2E/ccms-angular-styleguide)\n\n## 安装与使用\n\n```bash\n# 安装 ccms-components 和相关依赖\nnpm install --save ccms-components angular angular-resource angular-ui-router\n```\n\n### 引入方式\n\n#### ES6\n```js\nimport angular from 'angular';\nimport ngResource from 'angular-resource';\nimport uiRouter from 'angular-ui-router';\n\nimport ccmsComponents from 'ccms-components';\n\nangular.module('app', [ngResource, uiRouter, ccmsComponents]);\n```\n\n#### ES5\n```html\n\u003clink rel=\"stylesheet\" href=\"/node_modules/ccms-components.css\"\u003e\n\n\u003cscript src='/node_modules/angular/angular.js'\u003e\u003c/script\u003e\n\u003cscript src='/node_modules/angular-resource/angular-resource.js'\u003e\u003c/script\u003e\n\u003cscript src=\"/node_modules/angular-ui-router/release/angular-ui-router.js\"\u003e\u003c/script\u003e\n\n\u003cscript src='/node_modules/ccms-components.js'\u003e\u003c/script\u003e\n```\n\n### 注意事项\n\n* 使用 ccms-portal 的项目不需要重复打包 ccms-components。\n\n  由于 ccms-portal 中已经引入 ccms-components，所以相关项目在使用 webpack 打包时可忽略 ccms-components，配置如下：\n\n  ```js\n  externals: {'ccms-components': '\\'ccms.components\\''}\n  ```\n\n* 在 console 中运行下面这条语句可以查看 ccms-components 版本：\n\n  ```\n  angular.module('ccms.components').version\n  ```\n\n## 贡献代码\n\n### 组件库规范\n在遵照基本的开发指南基础上,组件库额外的规范:\n\n1. 需要对外暴露的服务,以 `$cc` 为前缀,如 `$ccModal`\n2. 组件库组件均以 `cc-xx` 形式提供,如`cc-grid`. (cc =\u003e ccms-component 首字母)\n3. 提交的组件, Controller 部分需同时提交单元测试,不符合无法通过review。如果是开发的新 feature ,同时需要提供 docs 文档及相应demo。\n4. 其他规范遵照目前已有组件的风格。\n\n### 开发步骤\n\n1. ccms-components 组内的人员直接 **clone** 本项目；其它人员请 **fork** 本项目。\n2. 基于 dev 分支创建你的分支，例如 feature/abc, bugfix/abc, docs/abc\n3. 开发完成之后，在 github 网页中创建一个 pull request，base 为 dev，compare 为你的分支名\n4. 等待上游 review，merge pull request\n5. 在开始另一个功能开发创建新分支之前，应当先将 dev 分支同步为最新的状态。\n\t```bash\n\t# 对于 ccms-components 组内的人员，在 dev 分支拉取更新\n\tgit pull\n\n\t# 对于 fork 本项目的人员，需要先将本项目添加为一个 git remote，再拉取更新，参考以下操作\n\t# step 1，添加一个 remote\n\tgit remote add ccms https://github.com/ShuyunFF2E/ccms-components\n\t# step 2, 在 dev 分支拉取 ccms 的更新\n\tgit pull ccms\n\t```\n6. 重复 2~5 的操作，创建新分支继续其它功能的开发\n\n### *发现 bug 怎么办*\n\n1. [提交 issue](https://github.com/ShuyunFF2E/ccms-components/issues/new) 描述问题，与相关人员确认是否是 bug\n2. 确认是 bug\n   * 如果对 bug 修复时效很敏感(影响产品发布时间)。遵照以下步骤（推荐）：\n     1. 将相应组件的代码 copy 到自己项目(通常为组件文件夹)，在原始组件代码基础上修复 bug，并给组件起一个别名(如 cc-menu 改为 cc-xxx-menu )，项目中改为使用 cc-xxx-menu。\n     2. 项目测试提交，确认修复代码可行后，将代码提交给组件库，等待组件库合并代码。[提交步骤](ccms-components#开发步骤)\n     3. 组件库合并提交代码后发布版本，portal 更新组件库后发布。\n     4. 将项目里的 cc-xxx-menu 还原成 cc-menu。\n   * 如果对 bug 修复时效不敏感，等待/提醒 组件库相关维护人员修复 bug 并发布版本。最后 portal 发布新版本组件库时，bug 自动修复。(周期通常较长，deprecated！)\n\n### 提交代码、pull request 准则\n\n提交代码的 commit message 和 pull request 标题需按如下格式：\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n```\n\n* `\u003ctype\u003e`，变更的类型，可用的类型有以下几种：\n\t- **feat**，A new feature\n\t- **fix**，A bug fix\n\t- **docs**，Documentation only changes\n\t- **style**，Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n\t- **refactor**，A code change that neither fixes a bug nor adds a feature\n\t- **perf**，A code change that improves performance\n\t- **test**，Adding missing tests\n\t- **chore**，Changes to the build process or auxiliary tools and libraries such as documentation generation\n* `\u003cscope\u003e`，标记变更的范围，通常为你的模块名\n* `\u003csubject\u003e`，用于描述的文字\n\n### 发布脚本\n\nrelease 脚本\n\n```bash\n# 正式版本\nnpm run release -- \u003cversion_category: major | minor | patch\u003e\n\n# 测试版本\nnpm run release -- \u003cversion_category: major | minor | patch\u003e --branch \u003cbranch_name\u003e\n```\n\n以下是 release 脚本内部所执行的子任务，包含[1, 2, 3]。当 release 脚本出错中断时，可以手动运行对应的脚本进行发布（需要注意参数）。\n\n1. 处理分支，打标签\n\n   ```bash\n   # 正式版本\n   npm run prepare-production -- \u003cversion_category: major | minor | patch\u003e\n\n   # 测试版本\n   npm run prepare-test -- \u003cversion_category: major | minor | patch\u003e --branch \u003cbranch_name\u003e\n   ```\n\n2. build\n\n   ```bash\n   # build 代码，产出到 dist/ 中\n   # 可以指定 git_revision 参数（如 master / v2.0.1 / 0abcdef），默认 build 当前 working tree 代码\n   npm run build [-- \u003cgit_revision\u003e]\n   ```\n\n3. 发布 npm 包\n\n   ```bash\n   # 将 dist/ 中 build 好的代码上传到 npm 仓库\n   npm run publish:package\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShuyunFF2E%2Fccms-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShuyunFF2E%2Fccms-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShuyunFF2E%2Fccms-components/lists"}