Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Next Next commit
Implement stage6
  • Loading branch information
Kuniwak committed Mar 16, 2015
commit 4a068ff3135fddbd7ff1e15a7319068335806e22
38 changes: 38 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
JavaScript Training
===================

JavaScript 初心者が JS の未来を見据えつつ、基礎をひととおり身に付けるための資料です。


環境のセットアップ
------------------

1. 必要なものをダウンロード

下のコマンドを端末で実行してください。

git clone https://github.com/mixi-inc/JavaScriptTraining.git
cd JavaScriptTraining
npm install


2. webサーバーを立ち上げる

下のコマンドを端末で実行してください。なお、トレーニング中は
このコマンドを終了しないでください。

$(npm bin)/gulp serve


3. トップページにアクセスする

ブラウザから http://localhost:8080 へアクセスしてください。


4. トレーニングを始める

public/stage1/tests.js を編集し、 http://localhost:8080/stage1 で
実行されるすべてのテストにパスするようコードを編集してください。

コードを編集しおわったら、ページのリロードが必要です。
ステージはすべてで 6 つあります。
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"dependencies": {
"bootstrap": "^3.3.2",
"bower": "^1.3.12",
"chai-jquery": "^2.0.0",
"jquery": "^2.1.3",
"whatwg-fetch": "^0.7.0"
Expand Down
17 changes: 17 additions & 0 deletions test/stage6/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"mocha": true
},
"rules": {
"no-unused-expressions": 0,
"no-undef-init": 0
},
"globals": {
"$": false,
"jQuery": false,
"fetch": false,
"Promise": false,
"HTMLCollection": false
}
}
32 changes: 32 additions & 0 deletions test/stage6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>mixi JS Training</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="http://img.mixi.net/img/basic/favicon.ico" type="image/vnd.microsoft.icon" rel="icon">
<link href="http://img.mixi.net/img/basic/favicon.ico" type="image/vnd.microsoft.icon" rel="shortcut icon">
<link rel="stylesheet" href="/modules/mocha/mocha.css">
<link rel="stylesheet" href="../common/mocha-patch.css">
</head>
<body>
<div id="mocha"></div>
<script src="/modules/jquery/dist/jquery.js"></script>
<script src="/modules/mocha/mocha.js"></script>
<script src="/modules/chai/chai.js"></script>
<script src="/modules/chai-jquery/chai-jquery.js"></script>
<script src="/modules/chai-as-promised/lib/chai-as-promised.js"></script>
<script src="/modules/whatwg-fetch/fetch.js"></script>
<script>
mocha.ui('bdd');
mocha.reporter('html');
expect = chai.expect;
</script>
<script>mocha.setup('bdd')</script>
<script src="tests.js"></script>
<script>
if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
else { mocha.run(); }
</script>
</body>
</html>
9 changes: 9 additions & 0 deletions test/stage6/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

describe('ステージ6(意図通りにモジュールを書ける)', function() {
it('あなたの満足のいくアプリケーションがここにある', function() {
var qualityOfYourAppliation = undefined;

expect(qualityOfYourAppliation).to.be.ok;
});
});