Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 6ba6699

Browse files
committed
Merge pull request #20 from mixi-inc/improve-2nd
いろいろ修正
2 parents 21e2ee4 + 78a4132 commit 6ba6699

File tree

13 files changed

+341
-164
lines changed

13 files changed

+341
-164
lines changed

‎.eslintrc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
"node": true
44
},
55
"rules": {
6-
"quotes": [2, "single"],
7-
"no-use-before-define": 0
6+
"//": "single quote に統一",
7+
"quotes": [2, "single", "avoid-escape"],
8+
9+
"//": "関数宣言文以外は hoisting 避けのため禁止",
10+
"no-use-before-define": [2, "nofunc"],
11+
12+
"//": "この形式のキャストはくっついていないと読みづらい",
13+
"space-infix-ops": [2, { "int32Hint": false }]
814
}
915
}

‎README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,23 @@ JavaScript 初心者が JS の未来を見据えつつ、
1111

1212

1313

14+
トレーニングの目標
15+
------------------
16+
17+
18+
19+
このトレーニングの目標は、
20+
**モジュールを読み書きできるようになり、**
21+
自分の好きなモジュールを
22+
つくれるようになることです。
23+
24+
25+
26+
トレーニングの前に、セットアップを
27+
終わらせてしまいましょう。
28+
29+
30+
1431
セットアップ
1532
------------
1633

@@ -52,7 +69,7 @@ JavaScriptTraining リポジトリを fork します。
5269
下のコマンドをターミナルで実行してください。
5370

5471
cd JavaScriptTraining
55-
npm run setup
72+
npm install
5673

5774

5875

@@ -1047,7 +1064,7 @@ fetch('/users.json')
10471064

10481065

10491066

1050-
実はこの Promsie という複雑な仕組みを使う理由は、
1067+
実はこの Promise という複雑な仕組みを使う理由は、
10511068

10521069
- 並行非同期処理
10531070
- 直列非同期処理
@@ -1118,8 +1135,6 @@ fetch('/api/foo')
11181135

11191136

11201137

1121-
#### モジュール
1122-
11231138
JavaScript は言語機能としてモジュールの
11241139
仕組みをもっていません。
11251140

@@ -1134,7 +1149,16 @@ JavaScript は言語機能としてモジュールの
11341149

11351150

11361151

1137-
[エコシステムの例](https://github.com/wilmoore/frontend-packagers)
1152+
- bower
1153+
- component
1154+
- jam
1155+
- volo
1156+
- npm with browserify
1157+
- spm
1158+
- jspm
1159+
- duo
1160+
1161+
(source: [wilmoore/frontend-packagers](https://github.com/wilmoore/frontend-packagers))
11381162

11391163

11401164

@@ -1156,9 +1180,14 @@ bower は、JavaScript、HTML、CSSなどを
11561180
自分が作ったモジュールを公開することも
11571181
できます。
11581182

1159-
ただ、JavaScript の場合モジュールの仕組みを
1160-
もたないため、この部分を RequireJS などの
1183+
1184+
1185+
ただ、bower はモジュール読み込みの
1186+
仕組みを提供していません。
1187+
1188+
この部分は RequireJS など、別の
11611189
モジュールシステムに頼ることになります。
1190+
11621191
どのモジュールシステムに対応するかという選択は、
11631192
bower によって読み込まれるパッケージ側に
11641193
裁量(責務)があります。

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Training course repository for JavaScript by mixi",
55
"main": "index.js",
66
"scripts": {
7-
"setup": "npm install; (cd public; bower install)",
7+
"postinstall": "(cd public; $(npm bin)/bower install)",
88
"help": "$(npm bin)/gulp help",
99
"serve": "$(npm bin)/gulp serve",
1010
"presentation": "$(npm bin)/reveal-md README.md --theme solarized --separator '^\\n\\n\\n' --verticalSeparator '^\\n\\n'"

‎public/.eslintrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"env": {
3-
"mocha": true
3+
"mocha": true,
4+
"browser": true,
5+
"jquery": true
46
},
57
"globals": {
68
"expect": false
9+
},
10+
"rules": {
11+
"//": "chai の expect 構文が誤警告になるため無視",
12+
"no-unused-expressions": 0
713
}
814
}

‎public/stage1/.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎public/stage2/.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎public/stage2/tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe('ステージ2(意図した通りに DOM 要素の属性・テキス
182182
});
183183

184184

185-
it('5 番の要素を jQuery を使って時計回り方向に 10 度回転させる', function() {
185+
it('11 番の要素を jQuery を使って時計回り方向に 10 度回転させる', function() {
186186

187187
// ここにコードを記述してください。
188188
// 変更した DOM 要素は $element 変数に代入してください。
@@ -198,7 +198,7 @@ describe('ステージ2(意図した通りに DOM 要素の属性・テキス
198198
});
199199

200200

201-
it('6 番の要素を jQuery を使って上に 20px 移動させる', function() {
201+
it('12 番の要素を jQuery を使って上に 20px 移動させる', function() {
202202

203203
// ここにコードを記述してください。
204204
// 変更した DOM 要素は $element 変数に代入してください。

‎public/stage3/.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎public/stage4/.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎public/stage5/.eslintrc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"mocha": true
5-
},
62
"globals": {
7-
"$": false,
8-
"jQuery": false,
93
"fetch": false,
10-
"Promise": false,
11-
"HTMLCollection": false
4+
"Promise": false
125
}
136
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /