Skip to content

Commit 96ffb5d

Browse files
committed
[T] update toc
1 parent eeba27b commit 96ffb5d

12 files changed

+195
-175
lines changed

README.md

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* [方便工作](http://github.phodal.com/#方便工作)
2121
* [获得一份工作](http://github.phodal.com/#获得一份工作)
2222
* [扩大交际](http://github.phodal.com/#扩大交际)
23+
* [创建开源项目](http://github.phodal.com/#创建开源项目)
24+
* [取一个好的名字](http://github.phodal.com/#取一个好的名字)
25+
* [挑选好 LICENSE](http://github.phodal.com/#挑选好-license)
26+
* [官方主页](http://github.phodal.com/#官方主页)
2327
* [Git基本知识与GitHub使用](http://github.phodal.com/#git基本知识与github使用)
2428
* [Git](http://github.phodal.com/#git)
2529
* [Git初入](http://github.phodal.com/#git初入)
@@ -31,6 +35,10 @@
3135
* [Pull Request](http://github.phodal.com/#pull-request)
3236
* [我的第一个PR](http://github.phodal.com/#我的第一个pr)
3337
* [CLA](http://github.phodal.com/#cla)
38+
* [创建项目文档](http://github.phodal.com/#创建项目文档)
39+
* [README](http://github.phodal.com/#readme)
40+
* [在线文档](http://github.phodal.com/#在线文档)
41+
* [可用示例](http://github.phodal.com/#可用示例)
3442
* [构建GitHub项目](http://github.phodal.com/#构建github项目)
3543
* [如何用好GitHub](http://github.phodal.com/#如何用好github)
3644
* [敏捷软件开发](http://github.phodal.com/#敏捷软件开发)
@@ -46,11 +54,7 @@
4654
* [代码质量与重构](http://github.phodal.com/#代码质量与重构)
4755
* [Code Climate](http://github.phodal.com/#code-climate)
4856
* [代码的坏味道](http://github.phodal.com/#代码的坏味道)
49-
* [创建项目文档](http://github.phodal.com/#创建项目文档)
50-
* [README](http://github.phodal.com/#readme)
51-
* [在线文档](http://github.phodal.com/#在线文档)
52-
* [可用示例](http://github.phodal.com/#可用示例)
53-
* [测试](http://github.phodal.com/#测试-1)
57+
* [改善 GitHub 项目代码质量:测试](http://github.phodal.com/#改善-github-项目代码质量测试)
5458
* [TDD](http://github.phodal.com/#tdd)
5559
* [一次测试驱动开发](http://github.phodal.com/#一次测试驱动开发)
5660
* [说说TDD](http://github.phodal.com/#说说tdd)
@@ -60,7 +64,7 @@
6064
* [Twill 登陆测试](http://github.phodal.com/#twill-登陆测试)
6165
* [Twill 测试脚本](http://github.phodal.com/#twill-测试脚本)
6266
* [Fake Server](http://github.phodal.com/#fake-server)
63-
* [重构](http://github.phodal.com/#重构)
67+
* [改善 GitHub 项目代码质量:重构](http://github.phodal.com/#改善-github-项目代码质量重构)
6468
* [为什么重构?](http://github.phodal.com/#为什么重构)
6569
* [重构uMarkdown](http://github.phodal.com/#重构umarkdown)
6670
* [代码说明](http://github.phodal.com/#代码说明)
@@ -70,28 +74,26 @@
7074
* [Inline Method](http://github.phodal.com/#inline-method)
7175
* [Pull Members Up](http://github.phodal.com/#pull-members-up)
7276
* [重构之以查询取代临时变量](http://github.phodal.com/#重构之以查询取代临时变量)
77+
* [如何推广](http://github.phodal.com/#如何推广)
78+
* [Marketing First](http://github.phodal.com/#marketing-first)
79+
* [编写 README](http://github.phodal.com/#编写-readme)
80+
* [这个项目做什么——一句话文案](http://github.phodal.com/#这个项目做什么一句话文案)
81+
* [它解决了什么问题](http://github.phodal.com/#它解决了什么问题)
82+
* [它有什么特性](http://github.phodal.com/#它有什么特性)
83+
* [hello, world 示例](http://github.phodal.com/#hello-world-示例)
84+
* [技术文档——手把手教会别人](http://github.phodal.com/#技术文档手把手教会别人)
85+
* [示例程序](http://github.phodal.com/#示例程序)
86+
* [吸引贡献者](http://github.phodal.com/#吸引贡献者)
87+
* [开源项目维护](http://github.phodal.com/#开源项目维护)
88+
* [如何以“正确的姿势”阅读开源软件代码](http://github.phodal.com/#如何以正确的姿势阅读开源软件代码)
89+
* [阅读过程](http://github.phodal.com/#阅读过程)
90+
* [示例](http://github.phodal.com/#示例)
7391
* [如何在GitHub“寻找灵感(fork)”](http://github.phodal.com/#如何在github寻找灵感fork)
7492
* [Lettuce构建过程](http://github.phodal.com/#lettuce构建过程)
7593
* [需求](http://github.phodal.com/#需求)
7694
* [计划](http://github.phodal.com/#计划)
7795
* [实现第一个需求](http://github.phodal.com/#实现第一个需求)
7896
* [实现第二个需求](http://github.phodal.com/#实现第二个需求)
79-
* [GitHub用户分析](http://github.phodal.com/#github用户分析)
80-
* [生成图表](http://github.phodal.com/#生成图表)
81-
* [数据解析](http://github.phodal.com/#数据解析)
82-
* [Matplotlib](http://github.phodal.com/#matplotlib)
83-
* [每周分析](http://github.phodal.com/#每周分析)
84-
* [python github 每周情况分析](http://github.phodal.com/#python-github-每周情况分析)
85-
* [Python 数据分析](http://github.phodal.com/#python-数据分析)
86-
* [Python Matplotlib图表](http://github.phodal.com/#python-matplotlib图表)
87-
* [存储到数据库中](http://github.phodal.com/#存储到数据库中)
88-
* [SQLite3](http://github.phodal.com/#sqlite3)
89-
* [数据导入](http://github.phodal.com/#数据导入)
90-
* [Redis](http://github.phodal.com/#redis)
91-
* [邻近算法与相似用户](http://github.phodal.com/#邻近算法与相似用户)
92-
* [如何以“正确的姿势”阅读开源软件代码](http://github.phodal.com/#如何以正确的姿势阅读开源软件代码)
93-
* [阅读过程](http://github.phodal.com/#阅读过程)
94-
* [示例](http://github.phodal.com/#示例)
9597
* [GitHub连击](http://github.phodal.com/#github连击)
9698
* [100天](http://github.phodal.com/#天)
9799
* [40天的提升](http://github.phodal.com/#天的提升)
@@ -119,7 +121,19 @@
119121
* [写在GitHub 的第 19999 个 star 时](http://github.phodal.com/#写在github-的第-19999-个-star-时)
120122
* [从创建开源框架说起](http://github.phodal.com/#从创建开源框架说起)
121123
* [下一个开源项目](http://github.phodal.com/#下一个开源项目)
122-
124+
* [GitHub用户分析](http://github.phodal.com/#github用户分析)
125+
* [生成图表](http://github.phodal.com/#生成图表)
126+
* [数据解析](http://github.phodal.com/#数据解析)
127+
* [Matplotlib](http://github.phodal.com/#matplotlib)
128+
* [每周分析](http://github.phodal.com/#每周分析)
129+
* [python github 每周情况分析](http://github.phodal.com/#python-github-每周情况分析)
130+
* [Python 数据分析](http://github.phodal.com/#python-数据分析)
131+
* [Python Matplotlib图表](http://github.phodal.com/#python-matplotlib图表)
132+
* [存储到数据库中](http://github.phodal.com/#存储到数据库中)
133+
* [SQLite3](http://github.phodal.com/#sqlite3)
134+
* [数据导入](http://github.phodal.com/#数据导入)
135+
* [Redis](http://github.phodal.com/#redis)
136+
* [邻近算法与相似用户](http://github.phodal.com/#邻近算法与相似用户)
123137

124138
## License
125139

chapters/01-start-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
创建开源项目
2-
---
2+
===
33

44

55
取一个好的名字

chapters/02-github-fundamentals.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Git基本知识与GitHub使用
1+
# Git基本知识与GitHub使用
22

3-
##Git
3+
## Git
44

55
从一般开发者的角度来看,git有以下功能:
66

@@ -19,7 +19,7 @@
1919
2. 打上补丁,解决冲突(可以自己解决,也可以要求开发者之间解决以后再重新提交,如果是开源项目,还要决定哪些补丁有用,哪些不用)。
2020
3. 向公共服务器提交结果,然后通知所有开发人员。
2121

22-
###Git初入
22+
### Git初入
2323

2424
如果是第一次使用Git,你需要设置署名和邮箱:
2525

@@ -65,7 +65,7 @@ $git status
6565
可以看到状态的变化是从黄色到绿色,即unstage到add。
6666
6767
68-
##GitHub
68+
## GitHub
6969
7070
Wiki百科上是这么说的
7171
@@ -90,7 +90,7 @@ Wiki百科上是这么说的
9090
9191
等等。看上去像是大餐,但是你还需要了解点什么?
9292
93-
###版本管理与软件部署
93+
### 版本管理与软件部署
9494
9595
jQuery[^jQuery]在发布版本``2.1.3``,一共有152个commit。我们可以看到如下的提交信息:
9696
@@ -101,13 +101,13 @@ jQuery[^jQuery]在发布版本``2.1.3``,一共有152个commit。我们可以
101101
- Build: Update commitplease dev dependency
102102
- ...
103103
104-
###GitHub与Git
104+
### GitHub与Git
105105
106106
> Git是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理。在推出后,Git在其它项目中也取得了很大成功,尤其是在Ruby社区中。目前,包括Rubinius、Merb和Bitcoin在内的很多知名项目都使用了Git。Git同样可以被诸如Capistrano和Vlad the Deployer这样的部署工具所使用。
107107
108108
> GitHub可以托管各种git库,并提供一个web界面,但与其它像 SourceForge或Google Code这样的服务不同,GitHub的独特卖点在于从另外一个项目进行分支的简易性。为一个项目贡献代码非常简单:首先点击项目站点的“fork”的按钮,然后将代码检出并将修改加入到刚才分出的代码库中,最后通过内建的“pull request”机制向项目负责人申请代码合并。已经有人将GitHub称为代码玩家的MySpace。
109109
110-
###在GitHub创建项目
110+
### 在GitHub创建项目
111111
112112
接着,我们试试在上面创建一个项目:
113113
@@ -177,11 +177,11 @@ C | 2
177177
- 资料收集: 如``free programming books``,``You-Dont-Know-JS``,``Font-Awesome``
178178
- 其他:简历如``Resume``
179179
180-
##Pull Request
180+
## Pull Request
181181
182182
除了创建项目之外,我们也可以创建Pull Request来做贡献。
183183
184-
###我的第一个PR
184+
### 我的第一个PR
185185
186186
我的第一个PR是给一个小的Node的CoAP相关的库的Pull Request。原因比较简单,是因为它的README.md写错了,导致我无法办法进行下一步。
187187
@@ -202,7 +202,7 @@ C | 2
202202
fi
203203
```
204204
205-
###CLA
205+
### CLA
206206
207207
CLA即Contributor License Agreement,在为一些大的组织、机构提交Pull Request的时候,可能需要签署这个协议。他们会在你的Pull Request里问你,只有你到他们的网站去注册并同意协议才会接受你的PR。
208208
@@ -215,5 +215,3 @@ CLA即Contributor License Agreement,在为一些大的组织、机构提交Pul
215215
![Eclipse CLA](./img/eclipse-cla.png)
216216
217217
他们都要求我签署CLA。
218-
219-
<hr>

chapters/03-create-project-documents.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
![GitHub Project Introduction](./img/github-intro.png)
1313

14-
##README
14+
## README
1515

1616
README通常会显示在GitHub项目的下面,如下图所示:
1717

@@ -38,7 +38,7 @@ README通常会显示在GitHub项目的下面,如下图所示:
3838
* 如何参与贡献
3939
* 协议
4040

41-
##在线文档
41+
## 在线文档
4242

4343
很多开源项目都会有自己的网站,并在上面有一个文档,而有的则会放在[https://readthedocs.org/](https://readthedocs.org/)
4444

@@ -48,7 +48,7 @@ README通常会显示在GitHub项目的下面,如下图所示:
4848

4949
写文档的软件有很多,如Markdown、Doxygen、Docbook等等。
5050

51-
##可用示例
51+
## 可用示例
5252

5353
一个简单上手的示例非常重要,特别是通常我们是在为着某个目的而去使用一个开源项目的是时候,我们希望能马上使用到我们的项目中。
5454

@@ -68,5 +68,3 @@ React.render(
6868
```
6969

7070
而不是需要繁琐的步骤才能进行下一步。
71-
72-
---

chapters/04-build-github-project.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
当只有一个人的时候,你只需要明确知道自己想要什么就够了。我们还需要的是CI、测试,以来提升代码的质量。
2121

22-
###测试
22+
### 测试
2323

2424
通常我们都会找Document,如果没有的话,你会找什么?看源代码,还是看测试?
2525

@@ -81,7 +81,7 @@ lettuce.js | 98.58% (209 / 212)| 82.98%(78 / 94) | 100.00% (54 / 54) | 98.58% (2
8181

8282
本地测试都通过了,于是我们添加了``Travis-CI``来跑我们的测试
8383

84-
###CI
84+
### CI
8585

8686
虽然node.js不算是一门语言,但是因为我们用的node,下面的是一个简单的``.travis.yml``示例:
8787

@@ -104,7 +104,7 @@ after_success: CODECLIMATE_REPO_TOKEN=321480822fc37deb0de70a11931b4cb6a2a3cc4116
104104
105105
CI对于一个开发者在不同城市开发同一项目上来说是很重要的,这意味着当你添加的部分功能有测试覆盖的时候,项目代码会更加强壮。
106106
107-
###代码质量
107+
### 代码质量
108108
109109
``jslint``这类的工具,只能保证代码在语法上是正确的,但是不能保证你写了一堆bad smell的代码。
110110
@@ -155,7 +155,7 @@ Lettuce.send = function (url, method, callback, data) {
155155

156156
这就意味着我们可以对上面的代码进行重构,他们是重复的代码。
157157

158-
##模块分离与测试
158+
## 模块分离与测试
159159

160160
在之前说到
161161

@@ -178,7 +178,7 @@ Lettuce.send = function (url, method, callback, data) {
178178

179179
等等。
180180

181-
###代码模块化
181+
### 代码模块化
182182

183183
在SkillTree的源码里,大致分为三部分:
184184

@@ -275,7 +275,7 @@ return {
275275

276276
当然函数也是一个对象。
277277

278-
###自动化测试
278+
### 自动化测试
279279

280280
一直习惯用Travis CI,于是也继续用Travis Ci,``.travis.yml``配置如下所示:
281281

@@ -312,7 +312,7 @@ branches:
312312

313313
最后的``test/spec``是指定测试的目录。
314314

315-
###Jshint
315+
### Jshint
316316

317317
> JSLint定义了一组编码约定,这比ECMA定义的语言更为严格。这些编码约定汲取了多年来的丰富编码经验,并以一条年代久远的编程原则 作为宗旨:能做并不意味着应该做。JSLint会对它认为有的编码实践加标志,另外还会指出哪些是明显的错误,从而促使你养成好的 JavaScript编码习惯。
318318
@@ -336,7 +336,7 @@ branches:
336336
Link Test
337337
✓ should return link label & url
338338

339-
###测试示例
339+
### 测试示例
340340

341341
简单地看一下Book的测试:
342342

@@ -398,7 +398,7 @@ it('should return book label & url', function () {
398398

399399
最后的断言,也算是测试的核心,保证测试是有用的。
400400

401-
##代码质量与重构
401+
## 代码质量与重构
402402

403403
- 当你写了一大堆代码,你没有意识到里面有一大堆重复。
404404
- 当你写了一大堆测试,却不知道覆盖率有多少。

chapters/07-github-marketing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
如何推广
2+
===
3+
14
除了擅长编写 md 电子书来攒 star,我还写了一系列的开源软件,也掌握了一些项目运营的技巧。
25

36
**开源并不是你把软件、README 写好就行了,还有详细的文档、示例程序等等**

chapters/08-maintain-project.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
开源项目维护
2+
===
3+

chapters/10-find-github-project.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#如何在GitHub"寻找灵感(fork)"
1+
# 如何在GitHub"寻找灵感(fork)"
22

33
> 重造轮子是重新创造一个已有的或是已被其他人优化的基本方法。
44
55
最近萌发了一个想法写游戏引擎,之前想着做一个JavaScript前端框架。看看,这个思路是怎么来的。
66

7-
##Lettuce构建过程
7+
## Lettuce构建过程
88

99
> Lettuce是一个简约的移动开发框架。
1010
@@ -25,7 +25,7 @@
2525

2626
> 构建一个库,里面从不同的库里面抽取出不同的函数。
2727
28-
###计划
28+
### 计划
2929

3030
这时候我参考了一本电子书《Build JavaScript FrameWork》,加上一些平时的需求,于是很快的就知道自己需要什么样的功能:
3131

@@ -42,18 +42,18 @@
4242

4343
而我们有一个前提是要保持这个库尽可能的小、同时我们还需要有测试。
4444

45-
###实现第一个需求
45+
### 实现第一个需求
4646

4747
简单说说是如何实现一个简单的需求。
4848

49-
####生成框架
49+
#### 生成框架
5050

5151
因为Yeoman可以生成一个简单的轮廓,所以我们可以用它来生成这个项目的骨架。
5252

5353
- Gulp
5454
- Jasmine
5555

56-
####寻找
56+
#### 寻找
5757

5858
在GitHub上搜索了一个看到了下面的几个结果:
5959

@@ -132,7 +132,7 @@ var promise = {
132132

133133
需要注意的是: ``License``,不同的软件有不同的License,如MIT、GPL等等。最好能在遵循协议的情况下,使用别人的代码。
134134

135-
###实现第二个需求
135+
### 实现第二个需求
136136

137137
由于已经有了现有的很多库,所以就可以直接参照(抄)别人写的代码。
138138

@@ -168,5 +168,3 @@ Lettuce.send = function (url, method, callback, data) {
168168
request.send(data);
169169
};
170170
```
171-
172-
---

0 commit comments

Comments
 (0)