mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-18 14:26:56 +00:00
Doc: update readme doc
This commit is contained in:
parent
42a19cfc49
commit
eec4e6b0e2
10
README.md
10
README.md
@ -9,9 +9,9 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
As a Node.js MVC framework, ThinkJS 2.0 has completely been rewritten with brand-new ECMAScript 6/7 features. By using ES7's `async/await` or ES6's `Generator Function` features, ThinkJS 2.0 could thoroughly solve the asynchronous nesting problem within Node.js. Also, ThinkJS 2.0 has designed by absorbing the concepts and ideas of many frameworks around the world, so developing Node.js projects with ThinkJS would be more simple and efficient than ever.
|
||||
As a Node.js MVC framework, ThinkJS 2.0 has completely been rewritten with brand-new ECMAScript 2015/2016 features. By using ES2016's `async/await` or ES2015's `Generator Function` features, ThinkJS 2.0 could thoroughly solve the asynchronous nesting problem within Node.js. Also, ThinkJS 2.0 has designed by absorbing the concepts and ideas of many frameworks around the world, so developing Node.js projects with ThinkJS would be more simple and efficient than ever.
|
||||
|
||||
It's a trend that using ES6/7 features to develop projects thanks to the high development efficiency. The new version of Node.js has improved to support many ES6/7 features, though some features have not been supported until now, and for those features we can use [Babel](http://babeljs.io/) to compile the code.
|
||||
It's a trend that using ES2015/2016 features to develop projects thanks to the high development efficiency. The new version of Node.js has improved to support many ES2015/2016 features, though some features have not been supported until now, and for those features we can use [Babel](http://babeljs.io/) to compile the code.
|
||||
|
||||
```js
|
||||
//user controller, home/controller/user.js
|
||||
@ -38,11 +38,11 @@ export default class extends think.controller.base {
|
||||
}
|
||||
```
|
||||
|
||||
With the help of Babel compiling, we can use the ES6/7 features boldly, and then the code can run in the Node.js 0.12.0+ environment stably.
|
||||
With the help of Babel compiling, we can use the ES2015/2016 features boldly, and then the code can run in the Node.js 0.12.0+ environment stably.
|
||||
|
||||
## Features
|
||||
|
||||
* Developing projects using all the new features of ES6/7.
|
||||
* Developing projects using all the new features of ES2015/2016.
|
||||
* Auto compiling & auto hot reload when file changed, no need to restart Node.js server.
|
||||
* Supporting TypeScript.
|
||||
* Supporting various project construct forms and environments.
|
||||
@ -70,7 +70,7 @@ npm install -g thinkjs
|
||||
## Create Application
|
||||
|
||||
```sh
|
||||
thinkjs new project_path --es6
|
||||
thinkjs new demo --es
|
||||
```
|
||||
|
||||
## Install dependencies
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
|
||||
## 介绍
|
||||
|
||||
ThinkJS 是一款使用 ES6/7 特性全新开发的 Node.js MVC 框架,使用 ES7 中`async/await`,或者 ES6 中的 `Generator Function` 特性彻底解决了 Node.js 中异步嵌套的问题。同时吸收了国内外众多框架的设计理念和思想,让开发 Node.js 项目更加简单、高效。
|
||||
ThinkJS 是一款使用 ES2015/2016 特性全新开发的 Node.js MVC 框架,使用 ES2016 中`async/await`,或者 ES2015 中的 `Generator Function` 特性彻底解决了 Node.js 中异步嵌套的问题。同时吸收了国内外众多框架的设计理念和思想,让开发 Node.js 项目更加简单、高效。
|
||||
|
||||
使用 ES6/7 特性来开发项目可以大大提高开发效率,是趋势所在。并且新版的 Node.js 对 ES6 特性也有了较好的支持,即使有些特性还没有支持,也可以借助 [Babel](http://babeljs.io/) 编译来支持。
|
||||
使用 ES2015/2016 特性来开发项目可以大大提高开发效率,是趋势所在。并且新版的 Node.js 对 ES6 特性也有了较好的支持,即使有些特性还没有支持,也可以借助 [Babel](http://babeljs.io/) 编译来支持。
|
||||
|
||||
|
||||
```js
|
||||
@ -40,11 +40,11 @@ export default class extends think.controller.base {
|
||||
```
|
||||
|
||||
|
||||
项目中可以大胆使用 ES6/7 里的所有特性,借助 Babel 编译,可以稳定运行在 `>=0.12.0` 的 Node.js 环境中。
|
||||
项目中可以大胆使用 ES2015/2016 里的所有特性,借助 Babel 编译,可以稳定运行在 `>=0.12.0` 的 Node.js 环境中。
|
||||
|
||||
## 特性
|
||||
|
||||
* 支持使用 ES6/7 全部特性来开发项目
|
||||
* 支持使用 ES2015/2016 全部特性来开发项目
|
||||
* 支持使用 TypeScript 开发项目
|
||||
* 支持多种项目结构和多种项目环境
|
||||
* 支持多级 Controller
|
||||
@ -73,7 +73,7 @@ npm install -g thinkjs
|
||||
## 创建项目
|
||||
|
||||
```sh
|
||||
thinkjs new project_path --es6
|
||||
thinkjs new demo --es
|
||||
```
|
||||
|
||||
## 安装依赖
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user