Skip to content
Permalink
Browse files

init: the new story

  • Loading branch information...
neoFelhz committed Feb 12, 2018
0 parents commit 782d3e7e282c3b5b281e4d84cbf6a8445d9c7151
Showing with 5,323 additions and 0 deletions.
  1. +6 −0 .eslintrc.json
  2. +11 −0 .gitignore
  3. +103 −0 CONTRIBUTING.md
  4. +102 −0 CONTRIBUTING.zh-cn.md
  5. +674 −0 LICENSE
  6. +300 −0 _config.template.yml
  7. +40 −0 contributing.json
  8. +119 −0 dist/css/prettify-theme/atelier-cave-dark.css
  9. +119 −0 dist/css/prettify-theme/atelier-cave-light.css
  10. +119 −0 dist/css/prettify-theme/atelier-dune-dark.css
  11. +119 −0 dist/css/prettify-theme/atelier-dune-light.css
  12. +119 −0 dist/css/prettify-theme/atelier-estuary-dark.css
  13. +119 −0 dist/css/prettify-theme/atelier-estuary-light.css
  14. +119 −0 dist/css/prettify-theme/atelier-forest-dark.css
  15. +119 −0 dist/css/prettify-theme/atelier-forest-light.css
  16. +119 −0 dist/css/prettify-theme/atelier-heath-dark.css
  17. +119 −0 dist/css/prettify-theme/atelier-heath-light.css
  18. +119 −0 dist/css/prettify-theme/atelier-lakeside-dark.css
  19. +119 −0 dist/css/prettify-theme/atelier-lakeside-light.css
  20. +119 −0 dist/css/prettify-theme/atelier-plateau-dark.css
  21. +119 −0 dist/css/prettify-theme/atelier-plateau-light.css
  22. +119 −0 dist/css/prettify-theme/atelier-savanna-dark.css
  23. +119 −0 dist/css/prettify-theme/atelier-savanna-light.css
  24. +119 −0 dist/css/prettify-theme/atelier-seaside-dark.css
  25. +119 −0 dist/css/prettify-theme/atelier-seaside-light.css
  26. +119 −0 dist/css/prettify-theme/atelier-sulphurpool-dark.css
  27. +119 −0 dist/css/prettify-theme/atelier-sulphurpool-light.css
  28. +119 −0 dist/css/prettify-theme/github-v2.css
  29. +119 −0 dist/css/prettify-theme/github.css
  30. +119 −0 dist/css/prettify-theme/hemisu-dark.css
  31. +119 −0 dist/css/prettify-theme/hemisu-light.css
  32. +119 −0 dist/css/prettify-theme/tomorrow-night-blue.css
  33. +119 −0 dist/css/prettify-theme/tomorrow-night-bright.css
  34. +119 −0 dist/css/prettify-theme/tomorrow-night-eighties.css
  35. +119 −0 dist/css/prettify-theme/tomorrow-night.css
  36. +119 −0 dist/css/prettify-theme/tomorrow.css
  37. +119 −0 dist/css/prettify-theme/tranquil-heart.css
  38. +119 −0 dist/css/prettify-theme/vibrant-ink.css
  39. +19 −0 dist/js/MathJax.js
  40. +2 −0 dist/js/hanabi-browser-bundle.js
  41. +30 −0 dist/js/prettify.js
  42. +22 −0 gulpfile.js
  43. +43 −0 layout/_partials/head.ejs
  44. +8 −0 layout/_partials/head/appicon.ejs
  45. +41 −0 layout/_partials/head/dns-prefetch.ejs
  46. +40 −0 layout/_partials/head/meta.ejs
  47. +13 −0 layout/_partials/head/open-graph.ejs
  48. +8 −0 layout/_partials/head/rss.ejs
  49. +6 −0 layout/_partials/head/site-verification.ejs
  50. +8 −0 layout/_plugin/analytics/baidu.ejs
  51. +3 −0 layout/_plugin/analytics/cnzz.ejs
  52. +7 −0 layout/_plugin/analytics/google.ejs
  53. +20 −0 layout/_plugin/highlight/hanabi.ejs
  54. +30 −0 layout/_plugin/highlight/prettify.ejs
  55. +22 −0 layout/_plugin/mathjax.ejs
  56. +19 −0 layout/_source/footer.ejs
  57. +5 −0 layout/_source/head.ejs
  58. +3 −0 layout/_widget/console.ejs
  59. +13 −0 layout/layout.ejs
  60. +36 −0 package.json
  61. 0 source/placeholder
@@ -0,0 +1,6 @@
{
"extends": "airbnb-base",
"plugins": [
"import"
]
}
@@ -0,0 +1,11 @@
.DS_Store

npm-debug.log

_config.yml

node_modules

.idea

.directory
@@ -0,0 +1,103 @@


# Commit message format

*Read this in other languages: [English](CONTRIBUTING.md), [简体中文](CONTRIBUTING.zh-cn.md).*

## 1. Title (Header)

**(1)type**

`type` is used to describe the commit class. It must be one of the following:

>- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Changes that affect the build system or external dependencies

**(2)scope**

`scope` is used to describe the scope of the impact of commit, such as sns, lang, share.

`scope` is placed after `type` and within parenthesis (`()`).

**(3)subject**

`subject` is a short description of the commit purpose, not more than 50 characters.

> - starts with a verb and uses the first person present, such as change, not changed or changes
- The first letter is lowercase
- End without a period (.)
---
See #119 `refactor(sns): simplify conditional display` for example.

## 2. Body

Body is a detailed description that can be divided into multiple lines. The following is an example.

>More detailed explanatory text, if necessary. Wrap it around
72 characters or so.
>Further paragraphs come after blank lines.
>- Bullet points are okay, too
- Use a hanging indent
There are two points to note:

(1) Use the first person present, such as `change` instead of `changed` or `changes`.

(2) The motivation for the code change should be stated, as well as the comparison with the previous behavior.

## 3. Footer

The Footer section is used only in two cases.

** (1) Incompatible changes **

If the current code is incompatible with the previous version, the Footer section begins with `BREAKING CHANGE`, followed by a description of the change, along with the reason for the change and the migration method.

BREAKING CHANGE: isolate scope bindings definition has changed.

To migrate the code follow the example below:

Before:

scope: {
myAttr: 'attribute',
}

After:

scope: {
myAttr: '@',
}

The removed `inject` wasn't generally useful for directives so there should be no code using it.

** (2) Close Issue **

If the current commit is for an issue, then you can close the issue in the Footer section.

Closes #234

You can also close more than one issue at a time.

Closes #123, #245, #992.

## 4. Revert

There is also a special case that if the current commit is used to revoke a previous commit, it must begin with `revert:` followed by the commit header.

revert: feat(pencil): add 'graphiteWidth' option

This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

Body part of the format is fixed, must be written as `This reverts commit <hash>.`, Where `hash` is revoked SHA identifier of the commit.

If the current commit is in the same release as the revoked commit, they will not appear in the Change log. If the two are in different releases, the current commit will appear in the Change log under the `Reverts` subtitle.
@@ -0,0 +1,102 @@


# Commit message format

*其他语言版本: [English](CONTRIBUTING.md), [简体中文](CONTRIBUTING.zh-cn.md).*

## 1. Title (Header)

**(1)type**

`type` 用于说明 commit 的类别,只允许使用下面 7 个标识。

>- feat: New feature 新功能
- fix: Fix bug 修补 bug
- docs: Documentation 文档
- style: Format 格式(不影响代码运行的变动)
- refactor: Refactor 重构(即不是新增功能,也不是修改 bug 的代码变动)
- test: Test 增加测试
- chore: 构建过程或辅助工具的变动
**(2)scope**

`scope` 用于说明 commit 影响的范围,比如 sns,lang,share。

`scope` 紧接 `type` 置于 `()` 之内。

**(3)subject**

`subject` 是 commit 目的的简短描述,不超过 50 个字符。

>- 以动词开头,使用第一人称现在时,比如change,而不是changed或changes
- 第一个字母小写
- 结尾不加句号(.)
---
Title 可参考 #119 `refactor(sns): simplify conditional display`

## 2. Body

Body 部分是对本次 commit 的详细描述,可以分成多行。下面是一个范例。

>More detailed explanatory text, if necessary. Wrap it to
about 72 characters or so.
>Further paragraphs come after blank lines.
>- Bullet points are okay, too
- Use a hanging indent
有两个注意点:

(1)使用第一人称现在时,比如使用 `change` 而不是 `changed``changes`

(2)应该说明代码变动的动机,以及与以前行为的对比。

## 3. Footer

Footer 部分只用于两种情况。

**(1)不兼容变动**

如果当前代码与上一个版本不兼容,则 Footer 部分以 `BREAKING CHANGE` 开头,后面是对变动的描述、以及变动理由和迁移方法。

BREAKING CHANGE: isolate scope bindings definition has changed.

To migrate the code follow the example below:

Before:

scope: {
myAttr: 'attribute',
}

After:

scope: {
myAttr: '@',
}

The removed `inject` wasn't generally useful for directives so there should be no code using it.

**(2)关闭 Issue**

如果当前 commit 针对某个 issue,那么可以在 Footer 部分关闭这个 issue 。

Closes #234

也可以一次关闭多个 issue 。

Closes #123, #245, #992

## 4. Revert

还有一种特殊情况,如果当前 commit 用于撤销以前的 commit,则必须以 `revert:` 开头,后面跟着被撤销 Commit 的 Header。

revert: feat(pencil): add 'graphiteWidth' option

This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

Body 部分的格式是固定的,必须写成 `This reverts commit <hash>.`,其中的 `hash` 是被撤销 commit 的 SHA 标识符。

如果当前 commit 与被撤销的 commit,在同一个发布(release)里面,那么它们都不会出现在 Change log 里面。如果两者在不同的发布,那么当前 commit,会出现在 Change log 的 `Reverts` 小标题下面。

0 comments on commit 782d3e7

Please sign in to comment.
You can’t perform that action at this time.