Skip to content

Commit

Permalink
fixes for 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zhe committed Apr 22, 2015
1 parent 412caa8 commit 11a9959
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions 01-introduction.md.erb
Expand Up @@ -40,7 +40,7 @@ Meteor 可能就是你要找的理想框架,当然,也可能不是。既然

在过去的几年中,我们一直在开发很多个 Meteor 项目,范围从网站到移动应用,从商业项目到开源项目。

我们学到了很多,但总是不那么容易找到问题的答案。我们不得不从不同来源讲东西拼凑在一起,并且在许多情况下,我们甚至创造了我们自己的解决方案。所以通过这本书,我们想分享所有这些经验教训,并创建了一个简单的一步一步的指导,来引导你从零开始构建一个完整的 Meteor 应用。
我们学到了很多,但总是不那么容易找到问题的答案。我们不得不从不同来源讲东西拼凑在一起,并且在许多情况下,我们甚至创造了我们自己的解决方案。所以通过这本书,我们想分享所有这些经验教训,并创建了一个简单的一步一步的指导,来引导你从零开始构建一个完整的 Meteor 应用。

我们即将构建的应用是一个简化版的社交新闻网站,类似 [Hacker News](http://news.ycombinator.com) 或 [Reddit](http://reddit.com),我们称之为 Microscope(借鉴 Meteor 开源应用 [Telescope](http://telesc.pe)),在开发的过程中,我们会解决 构建 Meteor 应用所会遇到的各种要素,例如用户账户、Meteor Collection、路由等等。

Expand Down Expand Up @@ -98,7 +98,7 @@ Meteor 可能就是你要找的理想框架,当然,也可能不是。既然

如果想快速上手,我们推荐阅读 Nick Farina 撰写的文章《[Git Is Simpler Than You Think](http://nfarina.com/post/9868516270/git-is-simpler)》。

对 Git 初学者,我们将以使用 [GitHub for Mac](http://mac.github.com/) 程序,不用命令行就可以克隆和管理仓库
对 Git 初学者,我们推荐使用 [GitHub](http://mac.github.com/) (Mac OS),或 [SourceTree](http://www.sourcetreeapp.com/) (Mac OS & Windows),这两个软件都是免费的

<% end %>

Expand Down
4 changes: 3 additions & 1 deletion 02-getting-started.md.erb
Expand Up @@ -10,12 +10,14 @@ paragraphs: 49

第一印象十分重要,安装 Meteor 并不会遇到什么困难。大多数情况下,在五分钟内便可以完成。

首先,我们打开终端窗口,输入以下命令来安装 Meteor:
首先,如果在 Mac OS 或 Linux 系统下,你可以打开终端窗口,输入以下命令来安装 Meteor:

~~~bash
$ curl https://install.meteor.com | sh
~~~

如果你使用 Windows 系统,请参考 Meteor 网站的 [安装指导](https://www.meteor.com/install)。

以上命令会在系统中安装 `meteor` 可执行文件,然后就可以使用 Meteor 了。

<% note do %>
Expand Down
2 changes: 1 addition & 1 deletion 13-voting.md.erb
Expand Up @@ -522,7 +522,7 @@ Router.route('/best/:postsLimit?', {name: 'bestPosts'});
}
}
~~~
<%= caption "client/templates/posts_edit.js" %>
<%= caption "client/templates/posts/posts_edit.js" %>
<%= highlight "7" %>

这些都做完了,现在我们得到了一个最佳帖子列表:
Expand Down
14 changes: 7 additions & 7 deletions 14-animations.md.erb
Expand Up @@ -114,7 +114,7 @@ Hooks 的全部清单如下:
</div>
</template>
```
<%= caption "/client/templates/posts/post_list.html" %>
<%= caption "client/templates/posts/posts_list.html" %>
<%= highlight "3,7" %>

在做其他事情之前,让我们看看当前**没有**动画效果的帖子列表:
Expand All @@ -132,7 +132,7 @@ Template.postsList.onRendered(function () {
}
});
```
<%= caption "/client/templates/posts/post_list.js" %>
<%= caption "client/templates/posts/posts_list.js" %>
<%= highlight "1~7" %>

刚刚定义的 `moveElement` 会在元素位置改变时被调用,从而取代 Blaze 的默认行为。由于现在这个函数还是空的,意味着*什么都不会发生*。
Expand Down Expand Up @@ -208,7 +208,7 @@ Template.postsList.onRendered(function () {
}
});
```
<%= caption "/client/templates/posts/post_list.js" %>
<%= caption "client/templates/posts/posts_list.js" %>

注解:

Expand Down Expand Up @@ -260,7 +260,7 @@ Template.postsList.onRendered(function () {
}
});
```
<%= caption "/client/templates/posts/post_list.js" %>
<%= caption "client/templates/posts/posts_list.js" %>
<%= highlight "3~7" %>

为了更好看到效果,我们通过控制台插入新帖子,来测试动画:
Expand Down Expand Up @@ -293,7 +293,7 @@ Template.postsList.onRendered(function () {
}
});
```
<%= caption "/client/templates/posts/post_list.js" %>
<%= caption "client/templates/posts/posts_list.js" %>
<%= highlight "12~16" %>

再次,在控制台(用 `Posts.remove('somePostId')`)删除一个帖子来测试动画效果。
Expand Down Expand Up @@ -331,7 +331,7 @@ Template.postsList.onRendered(function () {

//...
```
<%= caption "/client/stylesheets/style.css" %>
<%= caption "client/stylesheets/style.css" %>

是时候添加页面过渡代码了。代码看起来很熟悉,因为这和我们添加和删除帖子时的代码完全一致:

Expand All @@ -352,7 +352,7 @@ Template.layout.onRendered(function() {
}
});
```
<%= caption "/client/templates/application/layout.js" %>
<%= caption "client/templates/application/layout.js" %>
<%= gifscreenshot "14-6", "页面之间的过渡动画" %>
Expand Down
6 changes: 4 additions & 2 deletions b-changelog.md.erb
Expand Up @@ -5,10 +5,12 @@ date: 0099/01/02
number: 99
points: 1
appendix: true
version: 1.8
updated: "2015年2月10日"
version: 1.9
updated: "2015年4月15日"
---

### 2015年4月15日 <span class="marker version-marker">1.9</span>

### 2015年2月10日 <span class="marker version-marker">1.8</span>

- 重写“动画”章节,使用 `_uihooks`。
Expand Down

0 comments on commit 11a9959

Please sign in to comment.