forked from mycolorway/simditor
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
28a9008
commit 683a244
Showing
4 changed files
with
65 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ root: ../ | |
|
||
###获取源代码 | ||
|
||
在Github上fork Simditor的源代码仓库([什么是fork?](https://help.github.com/articles/fork-a-repo)): | ||
在 Github 上 fork Simditor 的源代码仓库([什么是 fork?](https://help.github.com/articles/fork-a-repo)): | ||
|
||
![Fork Simditor](http://pic.yupoo.com/farthinker_v/DFeVxRCs/custom.jpg) | ||
|
||
然后将fork之后的仓库clone到本地: | ||
然后将 fork 之后的仓库 clone 到本地: | ||
|
||
```bash | ||
$ git clone [email protected]:[your username]/simditor.git | ||
|
@@ -22,19 +22,19 @@ $ git clone [email protected]:[your username]/simditor.git | |
|
||
###安装Gem包 | ||
|
||
Simditor使用[Bundler](http://bundler.io/)来管理依赖的Ruby Gem: | ||
Simditor 使用 [Bundler](http://bundler.io/) 来管理依赖的 Ruby Gem: | ||
|
||
* [sass](https://github.com/nex3/sass):用来将scss文件编译为css文件 | ||
* [coffee-script](https://github.com/josh/ruby-coffee-script): 用来将coffee文件编译为js文件 | ||
* [github-pages](https://github.com/github/pages-gem): 在本地安装[Github Pages](https://pages.github.com/)使用的[Jekyll](http://jekyllrb.com/)环境,用来生成Simditor的网站 | ||
* [sass](https://github.com/nex3/sass):用来将 scss 文件编译为 css 文件 | ||
* [coffee-script](https://github.com/josh/ruby-coffee-script): 用来将 coffee 文件编译为 js 文件 | ||
* [github-pages](https://github.com/github/pages-gem): 在本地安装[Github Pages](https://pages.github.com/) 使用的 [Jekyll](http://jekyllrb.com/) 环境,用来生成 Simditor 的网站 | ||
|
||
首先,确保你的系统中已经安装了[Ruby](https://www.ruby-lang.org/en/installation/),然后在命令行中安装Bundler: | ||
首先,确保你的系统中已经安装了 [Ruby](https://www.ruby-lang.org/en/installation/),然后在命令行中安装 Bundler: | ||
|
||
```bash | ||
$ gem install bundler | ||
``` | ||
|
||
进入Simditor根目录,安装依赖的Gem包: | ||
进入 Simditor 根目录,安装依赖的 Gem 包: | ||
|
||
```bash | ||
$ cd simditor | ||
|
@@ -43,28 +43,28 @@ $ bundle install | |
|
||
###安装Grunt | ||
|
||
Simditor使用[Grunt](http://gruntjs.com/)来实现本地的自动化任务,例如运行本地开发服务器、监视源代码文件并自动编译等等。 | ||
Simditor 使用 [Grunt](http://gruntjs.com/) 来实现本地的自动化任务,例如运行本地开发服务器、监视源代码文件并自动编译等等。 | ||
|
||
Grunt需要通过[Node.js](http://nodejs.org/)的包管理工具npm来安装,所以先确保你的系统已经安装了Node.js,然后通过npm安装Grunt的命令行工具: | ||
Grunt 需要通过 [Node.js](http://nodejs.org/) 的包管理工具 npm 来安装,所以先确保你的系统已经安装了 Node.js,然后通过 npm 安装 Grunt 的命令行工具: | ||
|
||
```bash | ||
$ sudo npm install -g grunt-cli | ||
``` | ||
|
||
最后安装`package.json`里配置的grunt 插件: | ||
最后安装 `package.json` 里配置的 grunt 插件: | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
###开始开发 | ||
|
||
现在运行grunt的默认任务: | ||
现在运行 grunt 的默认任务: | ||
|
||
```bash | ||
$ grunt | ||
``` | ||
|
||
然后用浏览器访问`http://localhost:3000/demo.html`,就可以打开本地生成的Simditor网站了。这个时候修改Simditor的源代码,grunt会自动编译并重新生成网站,你只需要刷新页面就可以测试最新的改动。 | ||
然后用浏览器访问 `http://localhost:3000/demo.html`,就可以打开本地生成的 Simditor 网站了。这个时候修改 Simditor 的源代码,grunt 会自动编译并重新生成网站,你只需要刷新页面就可以测试最新的改动。 | ||
|
||
如果你需要测试上传功能,只需要给url增加一个upload参数就可以开启上传本地图片的功能:`http://localhost:3000/demo.html?upload`。 | ||
如果你需要测试上传功能,只需要给 url 增加一个 upload 参数就可以开启上传本地图片的功能:`http://localhost:3000/demo.html?upload`。 |
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