-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
46 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 贡献代码 | ||
|
||
### 开发 | ||
|
||
1. fork 并 clone 项目 | ||
1. 安装依赖 `npm install` | ||
1. 进入开发模式 `npm run dev`,webpack 会持续监听文件变化并重新构建 | ||
1. 在 Chrome 中加载 `dist` 目录 | ||
1. 请确保 `npm test` 测试通过 | ||
|
||
### 约定 | ||
|
||
- 从 1.0.0 开始,使用[语义化版本控制](https://semver.org) | ||
- 只提供必要的设置项,降低用户的决策负担 | ||
- 添加依赖时尽可能选择小巧、简单的包,维持打包体积、性能(比如使用 [just](https://github.com/angus-c/just) 替代 [lodash](https://lodash.com)、[Preact](https://preactjs.com/) 替代 [React](https://reactjs.org/),以及 [tinydate](https://github.com/lukeed/tinydate) 替代 [moment.js](https://momentjs.com/)) | ||
- 太空饭否添加上去的 CSS 类名或 ID 名,应该以 `sf-` 为前缀,且使用连字符风格(如 `sf-foo-bar`),避免和饭否原有的样式命名发生冲突 | ||
- 尽量不对图片作 base64 编码,因为会影响到性能 | ||
- 尽量不去调用饭否的 jQuery / YUI | ||
- 使用图片素材时应考虑到 HiDPI 显示器的适配 | ||
- SVG 图片应该使用 [svgo](https://github.com/svg/svgo) 作优化处理 | ||
- 在 merge pull request 时应选择“Squash and merge” |
15 changes: 12 additions & 3 deletions
15
src/version-history/README.md → docs/publish.md
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
## 如何选择新版本号 | ||
# 发布 | ||
|
||
### 如何选择新版本号 | ||
|
||
从 1.0.0 开始,太空饭否使用[语义化版本控制](https://semver.org)。当发布新版本时,选择新版本号应遵循: | ||
|
||
- 如果没有引入新功能,只是在现有基础上修补和改进,则应发布 patch(`_._.+`)更新; | ||
- 如果引入了新功能,则应该发布 minor(`_.+._`)更新; | ||
- 如果大幅度调整了代码或设计,则应该发布 major(`+._._`)更新。 | ||
|
||
## 更新历史的显示位置 | ||
### 更新历史的显示位置 | ||
|
||
- “设置” → “更新历史”,显示完整的更新历史 | ||
- 扩展启动时弹出通知,显示本次版本更新内容的概要(如果刚刚升级到了新版本、开启了相关设置,并且 `versionHistory` 中包含了该版本的更新内容) | ||
|
||
## 如何编写更新历史内容 | ||
### 如何编写更新历史内容 | ||
|
||
- 更新历史应该介绍该版本在功能、设计及用户体验方面新引入或修正的内容 | ||
- 应该避免无意义的文字,如“修正了一些 bug”,尽量不打扰用户 | ||
- 如果更新内容过多,可以在前面写一行概要,用于作为桌面通知内容显示 | ||
|
||
### 如何发布新版? | ||
|
||
1. 修改 `static/manifest.json` 中的版本号 | ||
1. 在 `src/version-history/versionHistory` 中添加更新说明(详见[这里](https://github.com/ispacekid/space-fanfou/blob/master/src/version-history/README.md),可选) | ||
1. 构建 `npm build` | ||
1. 将 `dist` 目录中的文件打包为 zip,提交到商店审核 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# 参见 /docs/publish.md | ||
|
||
v1.0.0 | ||
@2019-04-16 | ||
~ 这次版本更新完全重写了代码,带来了云同步功能,并且在功能、样式和用户体验方面作了大量改进。 | ||
|