Skip to content

Commit 685ba95

Browse files
author
Kuniwak
committed
Improve doc
1 parent 0d622b0 commit 685ba95

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -817,13 +817,21 @@ button.addEventListener('click', function(event) {
817817

818818
### ステージ5
819819

820-
サーバーと通信するトレーニング
820+
非同期処理のトレーニング
821821

822822

823823
#### サーバーとの通信
824824

825-
JavaScript にはサーバーと通信するための API が
826-
用意されています。
825+
非同期処理の代表例といえばサーバーとの通信です。
826+
827+
サーバーとの通信はネットワークを通過するため、
828+
かなりの時間がかかります。そこで、レスポンスが
829+
返ってくるまでの間に、別の処理をおこなうことに
830+
よって、時間を有効活用することが重要になります。
831+
832+
833+
JavaScript にはサーバーと非同期に通信するための
834+
API が用意されています。
827835

828836
- [fetch API](http://www.hcn.zaq.ne.jp/___/WEB/Fetch-ja.html)
829837

@@ -855,7 +863,7 @@ fetch('/users.json')
855863
console.log('parsed json', json)
856864
})
857865
.catch(function(error) {
858-
console.log('parsing failed', error)
866+
console.error('parsing failed', error)
859867
});
860868
```
861869

@@ -894,7 +902,7 @@ fetch('/users.json')
894902

895903
// /users.json の取得時にエラーがでたときに、
896904
// error をログに出力する
897-
console.log(error);
905+
console.error(error);
898906
});
899907
```
900908

@@ -1101,19 +1109,19 @@ bower で管轄したいファイルのディレクトリを開き、
11011109
このパッケージの作者を指定します。
11021110

11031111

1104-
##### 7. license
1112+
##### 8. license
11051113

11061114
好きなライセンスを選ぶとよいです。
11071115

11081116
デフォルトは [MIT ライセンス](http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license)です。
11091117

11101118

1111-
##### 8. homepage
1119+
##### 9. homepage
11121120

11131121
このパッケージの情報が見られる URL を記述します。
11141122

11151123

1116-
##### 9. set currenttly installed components as dependencies?
1124+
##### 10. set currenttly installed components as dependencies?
11171125

11181126
既に `bower_components` に含まれている
11191127
コンポーネントをパッケージ設定に
@@ -1122,7 +1130,7 @@ bower で管轄したいファイルのディレクトリを開き、
11221130
n で構いません。
11231131

11241132

1125-
##### 10. add commonly ignored files to ignore list?
1133+
##### 11. add commonly ignored files to ignore list?
11261134

11271135
`.gitignore` などのファイルから、
11281136
パッケージに含めないファイルの指定を
@@ -1131,15 +1139,15 @@ n で構いません。
11311139
y で読み込ませます。
11321140

11331141

1134-
##### 11. would you like to mark this package as private which prevents it from being accidentaly published to the registry?
1142+
##### 12. would you like to mark this package as private which prevents it from being accidentaly published to the registry?
11351143

11361144
bower のレジストリへ登録できないようにするか
11371145
どうか指定します。
11381146

11391147
y でレジストリへの公開ができないように設定します。
11401148

11411149

1142-
##### 12. Looks good?
1150+
##### 13. Looks good?
11431151

11441152
この設定で問題なければ y を入力します。
11451153

0 commit comments

Comments
 (0)