Skip to content

Commit bf4f65e

Browse files
authored
Merge pull request i5ting#4 from Naramsim/patch-1
Typo and code highlights
2 parents b732a34 + 0f79d84 commit bf4f65e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ npm基本命令
237237
| --- | --- | --- |
238238
| npm install xxx | 安装xxx模块,但不记录到package.json里 | npm i xxx |
239239
| npm install --save xxx | 安装xxx模块,并且记录到package.json里,字段对应的dependency,是产品环境必须依赖的模块 | npm i -s xxx |
240-
| npm install --save-de xxx | 安装xxx模块,并且记录到package.json里,字段对应的dev-dependency,是开发环境必须依赖的模块,比如测试类的(mocha、chai、sinon、zombie、supertest等)都在 | npm i -D xxx |
240+
| npm install --save-dev xxx | 安装xxx模块,并且记录到package.json里,字段对应的dev-dependency,是开发环境必须依赖的模块,比如测试类的(mocha、chai、sinon、zombie、supertest等)都在 | npm i -D xxx |
241241
| npm install --global xxx | 全局安装xxx模块,但不记录到package.json里,如果模块里package.json有bin配置,会自动链接,作为cli命令 | npm i -g xxx |
242242

243243
### 常用软件
@@ -516,7 +516,7 @@ Async/Await是异步操作的终极解决方案,Koa 2在node 7.6发布之后
516516

517517
这里给出一段Koa 2应用里的一段代码
518518

519-
```
519+
```js
520520
exports.list = async (ctx, next) => {
521521
try {
522522
let students = await Student.getAllAsync();
@@ -540,7 +540,7 @@ exports.list = async (ctx, next) => {
540540

541541
4.1 正常写法
542542

543-
```
543+
```js
544544
const pkgConf = require('pkg-conf');
545545

546546
async function main(){
@@ -555,7 +555,7 @@ main();
555555

556556
变态写法
557557

558-
```
558+
```js
559559
const pkgConf = require('pkg-conf');
560560

561561
(async () => {
@@ -568,7 +568,7 @@ const pkgConf = require('pkg-conf');
568568

569569
4.2 await + Promise
570570

571-
```
571+
```js
572572
const Promise = require('bluebird');
573573
const fs = Promise.promisifyAll(require("fs"));
574574

@@ -582,7 +582,7 @@ main();
582582

583583
4.3 await + co + generator
584584

585-
```
585+
```js
586586
const co = require('co');
587587
const Promise = require('bluebird');
588588
const fs = Promise.promisifyAll(require("fs"));

0 commit comments

Comments
 (0)