diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 00000000..bf0179d8 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "cwd": "public/" +} diff --git a/.eslintrc b/.eslintrc index fe468bd0..cd835b1d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,7 +3,16 @@ "node": true }, "rules": { - "quotes": [2, "single"], - "no-use-before-define": 0 + // single quote に統一 + "quotes": [2, "single", "avoid-escape"], + + // 関数宣言文以外は hoisting 避けのため禁止 + "no-use-before-define": [2, "nofunc"], + + // この形式のキャストはくっついていないと読みづらい + "space-infix-ops": [2, { "int32Hint": false }], + + // ガード節の読みやすさを重視して、一行の場合のみ許可する + "curly": [2, "multi-line"] } } diff --git a/.node-version b/.node-version new file mode 100644 index 00000000..b913b7c6 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +v4.1.0 diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..7d60f9f2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2015, mixi, inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. diff --git a/README.md b/README.md index d5124594..7bd5ea4f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,30 @@ JavaScript 初心者が JS の未来を見据えつつ、 +解答・解説について +------------------ + +解答は [2015-example-solution](https://github.com/mixi-inc/JavaScriptTraining/compare/2015...2015-example-solution) で見られます! + + + +トレーニングの目標 +------------------ + + + +このトレーニングの目標は、 +**モジュールを読み書きできるようになり、** +自分の好きなモジュールを +つくれるようになることです。 + + + +トレーニングの前に、セットアップを +終わらせてしまいましょう。 + + + セットアップ ------------ @@ -52,7 +76,7 @@ JavaScriptTraining リポジトリを fork します。 下のコマンドをターミナルで実行してください。 cd JavaScriptTraining - npm run setup + npm install @@ -63,7 +87,7 @@ JavaScriptTraining リポジトリを fork します。 なお、トレーニング中はこのコマンドを 終了しないでください。 - npm run serve + npm start @@ -375,7 +399,7 @@ JavaScript の仕様・文化に数多く ターミナルで下のコマンドを実行してください。 ESLint が実行されます。 - gulp lint-stage1 + npm run lint-stage-1 2. 構文ハイライトを効かせる @@ -534,6 +558,16 @@ CSS セレクタについては、[MDN のCSS リファレンス](https://develo +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-1 + +警告があれば、修正してみてください。 + + + ### ステージ2 DOM 要素の属性・テキストを変更する @@ -620,6 +654,16 @@ HTML/JavaScript/CSS 分業の基本です。 +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-2 + +警告があれば、修正してみてください。 + + + ### ステージ3 DOM の構造を変更するトレーニング @@ -709,6 +753,16 @@ DOM 構造の操作が重要なのです。 +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-3 + +警告があれば、修正してみてください。 + + + ### ステージ4 DOM イベントを利用するトレーニング @@ -739,7 +793,7 @@ click イベント以外にも多様なイベントがあります: - offline: ブラウザがオフラインになったとき ここに載っていないイベントの一覧は -[MDN DOM イベントリファレンス](https://developer.mozilla.org/ja/docs/Web2/Reference/Events) を +[MDN DOM イベントリファレンス](https://developer.mozilla.org/ja/docs/Web/Reference/Events) を 参照するとよいでしょう。 @@ -858,7 +912,7 @@ button 要素に `addEventListener` すればよいように `addEventListener` の引数で -1-2-4 か 1-3-4 のどちらかを選べます。 +1-2-4 か 2-3-4 のどちらかを選べます。 1. capturing フェーズ @@ -905,6 +959,16 @@ button.addEventListener('click', function(event) { +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-4 + +警告があれば、修正してみてください。 + + + ### ステージ5 非同期処理のトレーニング @@ -957,7 +1021,7 @@ console.log(2); JavaScript にはサーバーと非同期に通信するための API が用意されています。 -- [fetch API](http://www.hcn.zaq.ne.jp/___/WEB/Fetch-ja.html) +- [Fetch API](http://www.hcn.zaq.ne.jp/___/WEB/Fetch-ja.html) 現在策定中の新しい標準仕様 @@ -969,14 +1033,14 @@ API が用意されています。 今回は、JavaScript の将来を見据えて、 -fetch API によるサーバーとの通信を +Fetch API によるサーバーとの通信を トレーニングします。 -#### fetch API +#### Fetch API -fetch API は下のように書きます。 +Fetch API は下のように書きます。 このコードは、`/users.json` を 取得します。 @@ -1047,7 +1111,7 @@ fetch('/users.json') -実はこの Promsie という複雑な仕組みを使う理由は、 +実はこの Promise という複雑な仕組みを使う理由は、 - 並行非同期処理 - 直列非同期処理 @@ -1056,7 +1120,7 @@ fetch('/users.json') -#### Promise による平行非同期処理 +#### Promise による並行非同期処理 `Promise.all` を使います。 @@ -1107,19 +1171,27 @@ fetch('/api/foo') - [Promise に関する参考情報](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Promise) - [Promise 参考情報(重量級)](http://azu.github.io/promises-book/) -- [fetch API に関する参考情報](https://github.com/github/fetch) +- [Fetch API に関する参考情報](https://github.com/github/fetch) - [Github API に関する参考情報](https://developer.github.com/v3/) +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-5 + +警告があれば、修正してみてください。 + + + ### ステージ6 モジュールを実装するトレーニング -#### モジュール - JavaScript は言語機能としてモジュールの 仕組みをもっていません。 @@ -1134,7 +1206,16 @@ JavaScript は言語機能としてモジュールの -[エコシステムの例](https://github.com/wilmoore/frontend-packagers) +- bower +- component +- jam +- volo +- npm with browserify +- spm +- jspm +- duo + +(source: [wilmoore/frontend-packagers](https://github.com/wilmoore/frontend-packagers)) @@ -1156,9 +1237,14 @@ bower は、JavaScript、HTML、CSSなどを 自分が作ったモジュールを公開することも できます。 -ただ、JavaScript の場合モジュールの仕組みを -もたないため、この部分を RequireJS などの + + +ただ、bower はモジュール読み込みの +仕組みを提供していません。 + +この部分は RequireJS など、別の モジュールシステムに頼ることになります。 + どのモジュールシステムに対応するかという選択は、 bower によって読み込まれるパッケージ側に 裁量(責務)があります。 @@ -1303,7 +1389,7 @@ y で読み込ませます。 -##### 12. would you like to mark this package as private which prevents it from being accidentaly published to the registry? +##### 12. would you like to mark this package as private which prevents it from being accidentally published to the registry? bower のレジストリへ登録できないようにするか どうか指定します。 @@ -1325,6 +1411,12 @@ y でレジストリへの公開ができないように設定します。 パッケージは [Search Bower packages](http://bower.io/search/) で 検索することができます。 +もしくは + + bower search Buttons + +でも検索することができます。 + では、試しに [Buttons](https://github.com/alexwolfe/Buttons) パッケージを @@ -1363,6 +1455,16 @@ y でレジストリへの公開ができないように設定します。 +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-6 + +警告があれば、修正してみてください。 + + + ### ステージ7 よくあるイディオムを読むトレーニング @@ -1395,6 +1497,15 @@ y でレジストリへの公開ができないように設定します。 +#### クリアできたら + +Lint をかけてみましょう。 + + npm run lint-stage-7 + +警告があれば、修正してみてください。 + + 付録 ---- @@ -1404,9 +1515,9 @@ y でレジストリへの公開ができないように設定します。 -#### Promise による平行非同期処理 +#### Promise による並行非同期処理 -Promise による平行非同期処理を通常のやりかたと、 +Promise による並行非同期処理を通常のやりかたと、 Promise らしいやり方とでやってみました。 コードを比較してみてください。 @@ -1535,14 +1646,14 @@ fetch('/api/foo').then(fetchBar(fetchBuz(doSomething))); function fetchBar(callback) { return function(responseFoo) { doSomething(responseFoo); - fetchBar(callback); + fetch('/api/bar').then(callback); }; } function fetchBuz(callback) { return function(responseBar) { doSomething(responseBar); - fetchBuz(callback); + fetch('/api/buz').then(callback); }; } ``` diff --git a/gulp/serve.js b/gulp/serve.js index cc532f28..0f8bf2cc 100644 --- a/gulp/serve.js +++ b/gulp/serve.js @@ -46,6 +46,6 @@ var serve = function() { }; -serve.PORT = 8000; +serve.PORT = process.env.PORT || 8000; module.exports = serve; diff --git a/gulpfile.js b/gulpfile.js index de2a0bfd..d92667c8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,31 +2,30 @@ var path = require('path'); var gulp = require('gulp-help')(require('gulp')); -var merge = require('merge-stream'); var serve = require('./gulp/serve.js'); var tasks = [ { - id: 'stage1', + id: 'stage-1', help: '意図した DOM を取得できているかテストします' }, { - id: 'stage2', + id: 'stage-2', help: '意図通りに DOM のスタイルが変更できているかテストします' }, { - id: 'stage3', + id: 'stage-3', help: '意図通りに DOM の構造が変更できているかテストします' }, { - id: 'stage4', + id: 'stage-4', help: '意図通りにイベントを利用できているかテストします' }, { - id: 'stage5', + id: 'stage-5', help: '意図通りに非同期処理ができているかテストします' }, { - id: 'stage6', + id: 'stage-6', help: '意図通りにモジュールを実装できているかテストします' }, { - id: 'stage7', + id: 'stage-7', help: 'よくあるイディオムを読み書きできているかテストします' } ]; @@ -36,23 +35,13 @@ tasks.forEach(function(task) { var stage = path.join('public', task.id); var js = path.join(stage, '**/*.js'); var css = path.join(stage, '**/*.css'); - var csslintrc = path.join(stage, '.csslintrc'); gulp.task('lint-' + task.id, 'ミスのおこりやすいコード・可読性の低いコードがないか検査します', function() { var eslint = require('gulp-eslint'); - var csslint = require('gulp-csslint'); - var lints = merge( - gulp.src(css) - .pipe(csslint(csslintrc)) - .pipe(csslint.reporter()), - - gulp.src(js) - .pipe(eslint()) - .pipe(eslint.format()) - ); - - return lints; + return gulp.src(js) + .pipe(eslint()) + .pipe(eslint.format()) }); }); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json new file mode 100644 index 00000000..d09d565c --- /dev/null +++ b/npm-shrinkwrap.json @@ -0,0 +1,1915 @@ +{ + "name": "mixi-js-training", + "version": "0.0.0", + "dependencies": { + "bower": { + "version": "1.5.2", + "from": "bower@1.5.2", + "resolved": "https://registry.npmjs.org/bower/-/bower-1.5.2.tgz", + "dependencies": { + "abbrev": { + "version": "1.0.7", + "from": "abbrev@>=1.0.5 <2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" + }, + "archy": { + "version": "1.0.0", + "from": "archy@1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + }, + "bower-config": { + "version": "0.6.1", + "from": "bower-config@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/bower-config/-/bower-config-0.6.1.tgz", + "dependencies": { + "graceful-fs": { + "version": "2.0.3", + "from": "graceful-fs@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz" + }, + "mout": { + "version": "0.9.1", + "from": "mout@>=0.9.0 <0.10.0" + }, + "optimist": { + "version": "0.6.1", + "from": "optimist@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "from": "wordwrap@>=0.0.2 <0.1.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "minimist": { + "version": "0.0.10", + "from": "minimist@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + } + } + }, + "osenv": { + "version": "0.0.3", + "from": "osenv@0.0.3" + } + } + }, + "bower-endpoint-parser": { + "version": "0.2.2", + "from": "bower-endpoint-parser@>=0.2.2 <0.3.0" + }, + "bower-json": { + "version": "0.4.0", + "from": "bower-json@>=0.4.0 <0.5.0", + "dependencies": { + "deep-extend": { + "version": "0.2.11", + "from": "deep-extend@>=0.2.5 <0.3.0" + }, + "graceful-fs": { + "version": "2.0.3", + "from": "graceful-fs@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz" + }, + "intersect": { + "version": "0.0.3", + "from": "intersect@>=0.0.3 <0.1.0" + } + } + }, + "bower-logger": { + "version": "0.2.2", + "from": "bower-logger@>=0.2.2 <0.3.0" + }, + "bower-registry-client": { + "version": "0.3.0", + "from": "bower-registry-client@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/bower-registry-client/-/bower-registry-client-0.3.0.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "async@>=0.2.8 <0.3.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "graceful-fs": { + "version": "2.0.3", + "from": "graceful-fs@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz" + }, + "lru-cache": { + "version": "2.3.1", + "from": "lru-cache@>=2.3.0 <2.4.0" + }, + "request": { + "version": "2.51.0", + "from": "request@>=2.51.0 <2.52.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.51.0.tgz", + "dependencies": { + "bl": { + "version": "0.9.4", + "from": "bl@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.4.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.33", + "from": "readable-stream@>=1.0.26 <1.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + } + } + }, + "caseless": { + "version": "0.8.0", + "from": "caseless@>=0.8.0 <0.9.0" + }, + "forever-agent": { + "version": "0.5.2", + "from": "forever-agent@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" + }, + "form-data": { + "version": "0.2.0", + "from": "form-data@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "dependencies": { + "async": { + "version": "0.9.2", + "from": "async@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz" + }, + "mime-types": { + "version": "2.0.14", + "from": "mime-types@>=2.0.3 <2.1.0", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "dependencies": { + "mime-db": { + "version": "1.12.0", + "from": "mime-db@>=1.12.0 <1.13.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz" + } + } + } + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "from": "json-stringify-safe@>=5.0.0 <5.1.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "mime-types": { + "version": "1.0.2", + "from": "mime-types@>=1.0.1 <1.1.0" + }, + "node-uuid": { + "version": "1.4.3", + "from": "node-uuid@>=1.4.0 <1.5.0", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz" + }, + "qs": { + "version": "2.3.3", + "from": "qs@>=2.3.1 <2.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz" + }, + "tunnel-agent": { + "version": "0.4.1", + "from": "tunnel-agent@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.1.tgz" + }, + "tough-cookie": { + "version": "2.0.0", + "from": "tough-cookie@>=0.12.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.0.0.tgz" + }, + "http-signature": { + "version": "0.10.1", + "from": "http-signature@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "dependencies": { + "assert-plus": { + "version": "0.1.5", + "from": "assert-plus@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz" + }, + "asn1": { + "version": "0.1.11", + "from": "asn1@0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" + }, + "ctype": { + "version": "0.5.3", + "from": "ctype@0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz" + } + } + }, + "oauth-sign": { + "version": "0.5.0", + "from": "oauth-sign@>=0.5.0 <0.6.0" + }, + "hawk": { + "version": "1.1.1", + "from": "hawk@1.1.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz", + "dependencies": { + "hoek": { + "version": "0.9.1", + "from": "hoek@>=0.9.0 <0.10.0" + }, + "boom": { + "version": "0.4.2", + "from": "boom@>=0.4.0 <0.5.0" + }, + "cryptiles": { + "version": "0.2.2", + "from": "cryptiles@>=0.2.0 <0.3.0" + }, + "sntp": { + "version": "0.2.4", + "from": "sntp@>=0.2.0 <0.3.0" + } + } + }, + "aws-sign2": { + "version": "0.5.0", + "from": "aws-sign2@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz" + }, + "stringstream": { + "version": "0.0.4", + "from": "stringstream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz" + }, + "combined-stream": { + "version": "0.0.7", + "from": "combined-stream@>=0.0.5 <0.1.0", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "dependencies": { + "delayed-stream": { + "version": "0.0.5", + "from": "delayed-stream@0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" + } + } + } + } + }, + "request-replay": { + "version": "0.2.0", + "from": "request-replay@>=0.2.0 <0.3.0" + }, + "rimraf": { + "version": "2.2.8", + "from": "rimraf@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz" + }, + "mkdirp": { + "version": "0.3.5", + "from": "mkdirp@>=0.3.5 <0.4.0" + } + } + }, + "cardinal": { + "version": "0.4.4", + "from": "cardinal@0.4.4", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-0.4.4.tgz", + "dependencies": { + "redeyed": { + "version": "0.4.4", + "from": "redeyed@>=0.4.0 <0.5.0", + "dependencies": { + "esprima": { + "version": "1.0.4", + "from": "esprima@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz" + } + } + }, + "ansicolors": { + "version": "0.2.1", + "from": "ansicolors@>=0.2.1 <0.3.0" + } + } + }, + "chalk": { + "version": "1.1.1", + "from": "chalk@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.1.0", + "from": "ansi-styles@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz" + }, + "escape-string-regexp": { + "version": "1.0.3", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.0.0", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.0", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.0.0", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + } + } + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "chmodr": { + "version": "0.1.0", + "from": "chmodr@0.1.0", + "resolved": "https://registry.npmjs.org/chmodr/-/chmodr-0.1.0.tgz" + }, + "configstore": { + "version": "0.3.2", + "from": "configstore@>=0.3.2 <0.4.0", + "dependencies": { + "js-yaml": { + "version": "3.4.2", + "from": "js-yaml@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.2.tgz", + "dependencies": { + "argparse": { + "version": "1.0.2", + "from": "argparse@>=1.0.2 <1.1.0", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.2.tgz", + "dependencies": { + "lodash": { + "version": "3.10.1", + "from": "lodash@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz" + }, + "sprintf-js": { + "version": "1.0.3", + "from": "sprintf-js@>=1.0.2 <1.1.0", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + } + } + }, + "esprima": { + "version": "2.2.0", + "from": "esprima@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.2.0.tgz" + } + } + }, + "object-assign": { + "version": "2.1.1", + "from": "object-assign@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" + }, + "osenv": { + "version": "0.1.3", + "from": "osenv@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.1", + "from": "os-homedir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" + }, + "os-tmpdir": { + "version": "1.0.1", + "from": "os-tmpdir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" + } + } + }, + "uuid": { + "version": "2.0.1", + "from": "uuid@>=2.0.1 <3.0.0" + }, + "xdg-basedir": { + "version": "1.0.1", + "from": "xdg-basedir@>=1.0.0 <2.0.0" + } + } + }, + "decompress-zip": { + "version": "0.1.0", + "from": "decompress-zip@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.1.0.tgz", + "dependencies": { + "binary": { + "version": "0.3.0", + "from": "binary@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "dependencies": { + "chainsaw": { + "version": "0.1.0", + "from": "chainsaw@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "dependencies": { + "traverse": { + "version": "0.3.9", + "from": "traverse@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz" + } + } + }, + "buffers": { + "version": "0.1.1", + "from": "buffers@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz" + } + } + }, + "mkpath": { + "version": "0.1.0", + "from": "mkpath@>=0.1.0 <0.2.0" + }, + "readable-stream": { + "version": "1.1.13", + "from": "readable-stream@>=1.1.8 <2.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + }, + "touch": { + "version": "0.0.3", + "from": "touch@0.0.3", + "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", + "dependencies": { + "nopt": { + "version": "1.0.10", + "from": "nopt@>=1.0.10 <1.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz" + } + } + } + } + }, + "deep-sort-object": { + "version": "0.1.1", + "from": "deep-sort-object@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/deep-sort-object/-/deep-sort-object-0.1.1.tgz", + "dependencies": { + "mout": { + "version": "0.9.1", + "from": "mout@>=0.9.1 <0.10.0" + } + } + }, + "fstream": { + "version": "1.0.8", + "from": "fstream@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.2", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + }, + "fstream-ignore": { + "version": "1.0.2", + "from": "fstream-ignore@>=1.0.2 <2.0.0", + "dependencies": { + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", + "dependencies": { + "balanced-match": { + "version": "0.2.0", + "from": "balanced-match@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + } + } + }, + "github": { + "version": "0.2.4", + "from": "github@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/github/-/github-0.2.4.tgz", + "dependencies": { + "mime": { + "version": "1.3.4", + "from": "mime@>=1.2.11 <2.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" + } + } + }, + "glob": { + "version": "4.5.3", + "from": "glob@>=4.3.2 <5.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "dependencies": { + "inflight": { + "version": "1.0.4", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", + "dependencies": { + "balanced-match": { + "version": "0.2.0", + "from": "balanced-match@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.3.2", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + } + } + }, + "graceful-fs": { + "version": "3.0.8", + "from": "graceful-fs@>=3.0.5 <4.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz" + }, + "handlebars": { + "version": "2.0.0", + "from": "handlebars@>=2.0.0 <3.0.0", + "dependencies": { + "optimist": { + "version": "0.3.7", + "from": "optimist@>=0.3.0 <0.4.0", + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "from": "wordwrap@>=0.0.2 <0.1.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + } + } + }, + "uglify-js": { + "version": "2.3.6", + "from": "uglify-js@>=2.3.0 <2.4.0", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "async@>=0.2.6 <0.3.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "source-map": { + "version": "0.1.43", + "from": "source-map@>=0.1.7 <0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.0", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" + } + } + } + } + } + } + }, + "inquirer": { + "version": "0.8.0", + "from": "inquirer@0.8.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.8.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "1.1.1", + "from": "ansi-regex@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" + }, + "chalk": { + "version": "0.5.1", + "from": "chalk@>=0.5.0 <0.6.0", + "dependencies": { + "ansi-styles": { + "version": "1.1.0", + "from": "ansi-styles@>=1.1.0 <2.0.0" + }, + "escape-string-regexp": { + "version": "1.0.3", + "from": "escape-string-regexp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz" + }, + "has-ansi": { + "version": "0.1.0", + "from": "has-ansi@>=0.1.0 <0.2.0", + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "from": "ansi-regex@>=0.2.0 <0.3.0" + } + } + }, + "strip-ansi": { + "version": "0.3.0", + "from": "strip-ansi@>=0.3.0 <0.4.0", + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "from": "ansi-regex@>=0.2.0 <0.3.0" + } + } + }, + "supports-color": { + "version": "0.2.0", + "from": "supports-color@>=0.2.0 <0.3.0" + } + } + }, + "cli-color": { + "version": "0.3.3", + "from": "cli-color@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-0.3.3.tgz", + "dependencies": { + "d": { + "version": "0.1.1", + "from": "d@>=0.1.1 <0.2.0" + }, + "es5-ext": { + "version": "0.10.7", + "from": "es5-ext@>=0.10.6 <0.11.0", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz", + "dependencies": { + "es6-iterator": { + "version": "0.1.3", + "from": "es6-iterator@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" + }, + "es6-symbol": { + "version": "2.0.1", + "from": "es6-symbol@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" + } + } + }, + "memoizee": { + "version": "0.3.9", + "from": "memoizee@>=0.3.8 <0.4.0", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.3.9.tgz", + "dependencies": { + "es6-weak-map": { + "version": "0.1.4", + "from": "es6-weak-map@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz", + "dependencies": { + "es6-iterator": { + "version": "0.1.3", + "from": "es6-iterator@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" + }, + "es6-symbol": { + "version": "2.0.1", + "from": "es6-symbol@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" + } + } + }, + "event-emitter": { + "version": "0.3.3", + "from": "event-emitter@>=0.3.3 <0.4.0" + }, + "lru-queue": { + "version": "0.1.0", + "from": "lru-queue@>=0.1.0 <0.2.0" + }, + "next-tick": { + "version": "0.2.2", + "from": "next-tick@>=0.2.2 <0.3.0" + } + } + }, + "timers-ext": { + "version": "0.1.0", + "from": "timers-ext@>=0.1.0 <0.2.0", + "dependencies": { + "next-tick": { + "version": "0.2.2", + "from": "next-tick@>=0.2.2 <0.3.0" + } + } + } + } + }, + "figures": { + "version": "1.4.0", + "from": "figures@>=1.3.2 <2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.4.0.tgz" + }, + "lodash": { + "version": "2.4.2", + "from": "lodash@>=2.4.1 <2.5.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz" + }, + "mute-stream": { + "version": "0.0.4", + "from": "mute-stream@0.0.4", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz" + }, + "readline2": { + "version": "0.1.1", + "from": "readline2@>=0.1.0 <0.2.0", + "dependencies": { + "strip-ansi": { + "version": "2.0.1", + "from": "strip-ansi@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz" + } + } + }, + "rx": { + "version": "2.5.3", + "from": "rx@>=2.2.27 <3.0.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-2.5.3.tgz" + }, + "through": { + "version": "2.3.8", + "from": "through@>=2.3.4 <2.4.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "insight": { + "version": "0.5.3", + "from": "insight@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/insight/-/insight-0.5.3.tgz", + "dependencies": { + "async": { + "version": "0.9.2", + "from": "async@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz" + }, + "lodash.debounce": { + "version": "3.1.1", + "from": "lodash.debounce@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz", + "dependencies": { + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + } + } + }, + "object-assign": { + "version": "2.1.1", + "from": "object-assign@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" + }, + "os-name": { + "version": "1.0.3", + "from": "os-name@>=1.0.0 <2.0.0", + "dependencies": { + "osx-release": { + "version": "1.1.0", + "from": "osx-release@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/osx-release/-/osx-release-1.1.0.tgz", + "dependencies": { + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + } + } + }, + "win-release": { + "version": "1.1.1", + "from": "win-release@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz", + "dependencies": { + "semver": { + "version": "5.0.3", + "from": "semver@>=5.0.1 <6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz" + } + } + } + } + }, + "tough-cookie": { + "version": "0.12.1", + "from": "tough-cookie@>=0.12.1 <0.13.0", + "dependencies": { + "punycode": { + "version": "1.3.2", + "from": "punycode@>=0.2.0" + } + } + } + } + }, + "is-root": { + "version": "1.0.0", + "from": "is-root@>=1.0.0 <2.0.0" + }, + "junk": { + "version": "1.0.2", + "from": "junk@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/junk/-/junk-1.0.2.tgz" + }, + "lockfile": { + "version": "1.0.1", + "from": "lockfile@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz" + }, + "lru-cache": { + "version": "2.7.0", + "from": "lru-cache@>=2.5.0 <3.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz" + }, + "mkdirp": { + "version": "0.5.0", + "from": "mkdirp@0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "mout": { + "version": "0.11.0", + "from": "mout@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.0.tgz" + }, + "nopt": { + "version": "3.0.4", + "from": "nopt@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.4.tgz" + }, + "opn": { + "version": "1.0.2", + "from": "opn@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-1.0.2.tgz" + }, + "p-throttler": { + "version": "0.1.1", + "from": "p-throttler@0.1.1", + "resolved": "https://registry.npmjs.org/p-throttler/-/p-throttler-0.1.1.tgz", + "dependencies": { + "q": { + "version": "0.9.7", + "from": "q@>=0.9.2 <0.10.0" + } + } + }, + "promptly": { + "version": "0.2.0", + "from": "promptly@0.2.0", + "resolved": "https://registry.npmjs.org/promptly/-/promptly-0.2.0.tgz", + "dependencies": { + "read": { + "version": "1.0.7", + "from": "read@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "dependencies": { + "mute-stream": { + "version": "0.0.5", + "from": "mute-stream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" + } + } + } + } + }, + "q": { + "version": "1.4.1", + "from": "q@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz" + }, + "request": { + "version": "2.53.0", + "from": "request@2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "dependencies": { + "bl": { + "version": "0.9.4", + "from": "bl@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.4.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.33", + "from": "readable-stream@>=1.0.26 <1.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + } + } + }, + "caseless": { + "version": "0.9.0", + "from": "caseless@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz" + }, + "forever-agent": { + "version": "0.5.2", + "from": "forever-agent@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" + }, + "form-data": { + "version": "0.2.0", + "from": "form-data@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "dependencies": { + "async": { + "version": "0.9.2", + "from": "async@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz" + } + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "from": "json-stringify-safe@>=5.0.0 <5.1.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "mime-types": { + "version": "2.0.14", + "from": "mime-types@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "dependencies": { + "mime-db": { + "version": "1.12.0", + "from": "mime-db@>=1.12.0 <1.13.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz" + } + } + }, + "node-uuid": { + "version": "1.4.3", + "from": "node-uuid@>=1.4.0 <1.5.0", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz" + }, + "qs": { + "version": "2.3.3", + "from": "qs@>=2.3.1 <2.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz" + }, + "tunnel-agent": { + "version": "0.4.1", + "from": "tunnel-agent@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.1.tgz" + }, + "tough-cookie": { + "version": "2.0.0", + "from": "tough-cookie@>=0.12.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.0.0.tgz" + }, + "http-signature": { + "version": "0.10.1", + "from": "http-signature@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "dependencies": { + "assert-plus": { + "version": "0.1.5", + "from": "assert-plus@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz" + }, + "asn1": { + "version": "0.1.11", + "from": "asn1@0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" + }, + "ctype": { + "version": "0.5.3", + "from": "ctype@0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz" + } + } + }, + "oauth-sign": { + "version": "0.6.0", + "from": "oauth-sign@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz" + }, + "hawk": { + "version": "2.3.1", + "from": "hawk@>=2.3.0 <2.4.0", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "dependencies": { + "hoek": { + "version": "2.16.2", + "from": "hoek@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.2.tgz" + }, + "boom": { + "version": "2.8.0", + "from": "boom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.8.0.tgz" + }, + "cryptiles": { + "version": "2.0.5", + "from": "cryptiles@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" + }, + "sntp": { + "version": "1.0.9", + "from": "sntp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + } + } + }, + "aws-sign2": { + "version": "0.5.0", + "from": "aws-sign2@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz" + }, + "stringstream": { + "version": "0.0.4", + "from": "stringstream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz" + }, + "combined-stream": { + "version": "0.0.7", + "from": "combined-stream@>=0.0.5 <0.1.0", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "dependencies": { + "delayed-stream": { + "version": "0.0.5", + "from": "delayed-stream@0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" + } + } + }, + "isstream": { + "version": "0.1.2", + "from": "isstream@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + } + } + }, + "request-progress": { + "version": "0.3.1", + "from": "request-progress@0.3.1", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-0.3.1.tgz", + "dependencies": { + "throttleit": { + "version": "0.0.2", + "from": "throttleit@>=0.0.2 <0.1.0" + } + } + }, + "retry": { + "version": "0.6.1", + "from": "retry@0.6.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.6.1.tgz" + }, + "rimraf": { + "version": "2.4.3", + "from": "rimraf@>=2.2.8 <3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.3.tgz", + "dependencies": { + "glob": { + "version": "5.0.14", + "from": "glob@>=5.0.14 <6.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.14.tgz", + "dependencies": { + "inflight": { + "version": "1.0.4", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", + "dependencies": { + "balanced-match": { + "version": "0.2.0", + "from": "balanced-match@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.3.2", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.0", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + } + } + } + } + }, + "semver": { + "version": "2.3.2", + "from": "semver@>=2.3.0 <3.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz" + }, + "shell-quote": { + "version": "1.4.3", + "from": "shell-quote@>=1.4.2 <2.0.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.4.3.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "array-filter": { + "version": "0.0.1", + "from": "array-filter@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz" + }, + "array-reduce": { + "version": "0.0.0", + "from": "array-reduce@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz" + }, + "array-map": { + "version": "0.0.0", + "from": "array-map@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz" + } + } + }, + "stringify-object": { + "version": "1.0.1", + "from": "stringify-object@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-1.0.1.tgz" + }, + "tar-fs": { + "version": "1.8.1", + "from": "tar-fs@>=1.4.1 <2.0.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.8.1.tgz", + "dependencies": { + "pump": { + "version": "1.0.0", + "from": "pump@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.0.tgz", + "dependencies": { + "end-of-stream": { + "version": "1.1.0", + "from": "end-of-stream@>=1.1.0 <2.0.0" + }, + "once": { + "version": "1.3.2", + "from": "once@>=1.3.1 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + } + } + }, + "tar-stream": { + "version": "1.2.1", + "from": "tar-stream@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.2.1.tgz", + "dependencies": { + "bl": { + "version": "1.0.0", + "from": "bl@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.0.tgz" + }, + "end-of-stream": { + "version": "1.1.0", + "from": "end-of-stream@>=1.1.0 <2.0.0", + "dependencies": { + "once": { + "version": "1.3.2", + "from": "once@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + } + } + }, + "readable-stream": { + "version": "2.0.2", + "from": "readable-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "process-nextick-args": { + "version": "1.0.3", + "from": "process-nextick-args@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.1", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + } + } + }, + "xtend": { + "version": "4.0.0", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + } + } + } + } + }, + "tmp": { + "version": "0.0.24", + "from": "tmp@0.0.24", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz" + }, + "update-notifier": { + "version": "0.3.2", + "from": "update-notifier@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-0.3.2.tgz", + "dependencies": { + "is-npm": { + "version": "1.0.0", + "from": "is-npm@>=1.0.0 <2.0.0" + }, + "latest-version": { + "version": "1.0.1", + "from": "latest-version@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-1.0.1.tgz", + "dependencies": { + "package-json": { + "version": "1.2.0", + "from": "package-json@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-1.2.0.tgz", + "dependencies": { + "got": { + "version": "3.3.1", + "from": "got@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-3.3.1.tgz", + "dependencies": { + "duplexify": { + "version": "3.4.2", + "from": "duplexify@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.4.2.tgz", + "dependencies": { + "end-of-stream": { + "version": "1.0.0", + "from": "end-of-stream@1.0.0", + "dependencies": { + "once": { + "version": "1.3.2", + "from": "once@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + } + } + }, + "readable-stream": { + "version": "2.0.2", + "from": "readable-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "process-nextick-args": { + "version": "1.0.3", + "from": "process-nextick-args@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.1", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + } + } + } + } + }, + "infinity-agent": { + "version": "2.0.3", + "from": "infinity-agent@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/infinity-agent/-/infinity-agent-2.0.3.tgz" + }, + "is-redirect": { + "version": "1.0.0", + "from": "is-redirect@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz" + }, + "is-stream": { + "version": "1.0.1", + "from": "is-stream@>=1.0.0 <2.0.0" + }, + "lowercase-keys": { + "version": "1.0.0", + "from": "lowercase-keys@>=1.0.0 <2.0.0" + }, + "nested-error-stacks": { + "version": "1.0.1", + "from": "nested-error-stacks@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-1.0.1.tgz", + "dependencies": { + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + }, + "object-assign": { + "version": "3.0.0", + "from": "object-assign@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + }, + "prepend-http": { + "version": "1.0.3", + "from": "prepend-http@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.3.tgz" + }, + "read-all-stream": { + "version": "3.0.1", + "from": "read-all-stream@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.0.1.tgz", + "dependencies": { + "pinkie-promise": { + "version": "1.0.0", + "from": "pinkie-promise@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "dependencies": { + "pinkie": { + "version": "1.0.0", + "from": "pinkie@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz" + } + } + }, + "readable-stream": { + "version": "2.0.2", + "from": "readable-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "process-nextick-args": { + "version": "1.0.3", + "from": "process-nextick-args@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.1", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + } + } + } + } + }, + "timed-out": { + "version": "2.0.0", + "from": "timed-out@>=2.0.0 <3.0.0" + } + } + }, + "registry-url": { + "version": "3.0.3", + "from": "registry-url@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.0.3.tgz", + "dependencies": { + "rc": { + "version": "1.1.1", + "from": "rc@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.1.tgz", + "dependencies": { + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + }, + "deep-extend": { + "version": "0.2.11", + "from": "deep-extend@>=0.2.5 <0.3.0" + }, + "strip-json-comments": { + "version": "0.1.3", + "from": "strip-json-comments@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + } + } + } + } + } + } + } + } + }, + "semver-diff": { + "version": "2.0.0", + "from": "semver-diff@>=2.0.0 <3.0.0", + "dependencies": { + "semver": { + "version": "4.3.6", + "from": "semver@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" + } + } + }, + "string-length": { + "version": "1.0.1", + "from": "string-length@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", + "dependencies": { + "strip-ansi": { + "version": "3.0.0", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.0.0", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + } + } + } + } + } + } + }, + "user-home": { + "version": "1.1.1", + "from": "user-home@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + }, + "which": { + "version": "1.1.2", + "from": "which@>=1.0.8 <2.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.1.2.tgz", + "dependencies": { + "is-absolute": { + "version": "0.1.7", + "from": "is-absolute@>=0.1.7 <0.2.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", + "dependencies": { + "is-relative": { + "version": "0.1.3", + "from": "is-relative@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz" + } + } + } + } + } + } + }, + "reveal-md": { + "version": "0.0.20", + "from": "reveal-md@0.0.20", + "resolved": "https://registry.npmjs.org/reveal-md/-/reveal-md-0.0.20.tgz", + "dependencies": { + "reveal.js": { + "version": "3.1.0", + "from": "reveal.js@3.1.0", + "resolved": "https://registry.npmjs.org/reveal.js/-/reveal.js-3.1.0.tgz", + "dependencies": { + "underscore": { + "version": "1.5.2", + "from": "underscore@>=1.5.1 <1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz" + }, + "express": { + "version": "2.5.11", + "from": "express@>=2.5.9 <2.6.0", + "resolved": "https://registry.npmjs.org/express/-/express-2.5.11.tgz", + "dependencies": { + "connect": { + "version": "1.9.2", + "from": "connect@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-1.9.2.tgz", + "dependencies": { + "formidable": { + "version": "1.0.17", + "from": "formidable@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.17.tgz" + } + } + }, + "mime": { + "version": "1.2.4", + "from": "mime@1.2.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.4.tgz" + }, + "qs": { + "version": "0.4.2", + "from": "qs@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.4.2.tgz" + }, + "mkdirp": { + "version": "0.3.0", + "from": "mkdirp@0.3.0" + } + } + }, + "mustache": { + "version": "0.7.3", + "from": "mustache@>=0.7.2 <0.8.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-0.7.3.tgz" + }, + "socket.io": { + "version": "0.9.17", + "from": "socket.io@>=0.9.16 <0.10.0", + "dependencies": { + "socket.io-client": { + "version": "0.9.16", + "from": "socket.io-client@0.9.16", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz", + "dependencies": { + "uglify-js": { + "version": "1.2.5", + "from": "uglify-js@1.2.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz" + }, + "ws": { + "version": "0.4.32", + "from": "ws@>=0.4.0 <0.5.0", + "dependencies": { + "commander": { + "version": "2.1.0", + "from": "commander@>=2.1.0 <2.2.0" + }, + "nan": { + "version": "1.0.0", + "from": "nan@>=1.0.0 <1.1.0" + }, + "tinycolor": { + "version": "0.0.1", + "from": "tinycolor@>=0.0.0 <1.0.0", + "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz" + }, + "options": { + "version": "0.0.6", + "from": "options@>=0.0.5", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz" + } + } + }, + "xmlhttprequest": { + "version": "1.4.2", + "from": "xmlhttprequest@1.4.2", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz" + }, + "active-x-obfuscator": { + "version": "0.0.1", + "from": "active-x-obfuscator@0.0.1", + "resolved": "https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz", + "dependencies": { + "zeparser": { + "version": "0.0.5", + "from": "zeparser@0.0.5", + "resolved": "https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz" + } + } + } + } + }, + "policyfile": { + "version": "0.0.4", + "from": "policyfile@0.0.4", + "resolved": "https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz" + }, + "base64id": { + "version": "0.1.0", + "from": "base64id@0.1.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz" + }, + "redis": { + "version": "0.7.3", + "from": "redis@0.7.3", + "resolved": "https://registry.npmjs.org/redis/-/redis-0.7.3.tgz" + } + } + } + } + }, + "mustache": { + "version": "2.1.3", + "from": "mustache@2.1.3", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.1.3.tgz" + }, + "open": { + "version": "0.0.5", + "from": "open@0.0.5", + "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz" + }, + "glob": { + "version": "5.0.14", + "from": "glob@5.0.14", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.14.tgz", + "dependencies": { + "inflight": { + "version": "1.0.4", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", + "dependencies": { + "balanced-match": { + "version": "0.2.0", + "from": "balanced-match@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.3.2", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.0", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + } + } + }, + "commander": { + "version": "2.8.1", + "from": "commander@2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + } + } + }, + "highlight.js": { + "version": "8.7.0", + "from": "highlight.js@8.7.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-8.7.0.tgz" + } + } + } + } +} diff --git a/package.json b/package.json index 2423af7b..0fa65628 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,17 @@ "description": "Training course repository for JavaScript by mixi", "main": "index.js", "scripts": { - "setup": "npm install; (cd public; bower install)", - "help": "$(npm bin)/gulp help", - "serve": "$(npm bin)/gulp serve", - "presentation": "$(npm bin)/reveal-md README.md --theme solarized --separator '^\\n\\n\\n' --verticalSeparator '^\\n\\n'" + "postinstall": "bower install", + "help": "gulp help", + "start": "gulp serve", + "presentation": "reveal-md README.md --theme solarized --separator '^\\n\\n\\n' --verticalSeparator '^\\n\\n'", + "lint-stage-1": "gulp lint-stage-1", + "lint-stage-2": "gulp lint-stage-2", + "lint-stage-3": "gulp lint-stage-3", + "lint-stage-4": "gulp lint-stage-4", + "lint-stage-5": "gulp lint-stage-5", + "lint-stage-6": "gulp lint-stage-6", + "lint-stage-7": "gulp lint-stage-7" }, "repository": { "type": "git", @@ -17,26 +24,25 @@ "training" ], "author": "Kuniwak", - "license": "BSD", + "license": "MIT", "bugs": { "url": "https://github.com/mixi-inc/JavaScriptTraining/issues" }, + "engines": { + "node": "~4.1.0" + }, "homepage": "https://github.com/mixi-inc/JavaScriptTraining", "devDependencies": { - "body-parser": "^1.12.0", - "event-stream": "^3.3.0", - "express": "^4.12.2", - "gulp": "^3.8.11", - "gulp-csslint": "^0.1.5", - "gulp-eslint": "^0.6.0", - "gulp-help": "^1.3.3", - "gulp-nodemon": "^1.0.5", - "gulp-util": "^3.0.4", - "merge-stream": "^0.1.7", - "stream-combiner2": "^1.0.2" + "body-parser": "1.14.0", + "express": "4.13.3", + "gulp": "3.9.0", + "gulp-eslint": "1.0.0", + "gulp-help": "1.6.1", + "gulp-nodemon": "2.0.4", + "gulp-util": "3.0.6" }, "dependencies": { - "bower": "^1.3.12", - "reveal-md": "0.0.16" + "bower": "1.5.2", + "reveal-md": "0.0.20" } } diff --git a/public/.eslintrc b/public/.eslintrc index 1a13a3ee..ac6504b8 100644 --- a/public/.eslintrc +++ b/public/.eslintrc @@ -1,8 +1,14 @@ { "env": { - "mocha": true + "mocha": true, + "browser": true, + "jquery": true }, "globals": { "expect": false + }, + "rules": { + // chai の expect 構文が誤警告になるため無視 + "no-unused-expressions": 0 } } diff --git a/public/stage1/.eslintrc b/public/stage1/.eslintrc deleted file mode 100644 index ddbc632c..00000000 --- a/public/stage1/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "mocha": true - }, - "globals": { - "$": false, - "jQuery": false, - "HTMLCollection": false - } -} diff --git a/public/stage1/analytics.js b/public/stage1/analytics.js index d2e4b2d1..1a139d43 100644 --- a/public/stage1/analytics.js +++ b/public/stage1/analytics.js @@ -11,11 +11,11 @@ style.position = 'absolute'; style.fontSize = '100px'; - style.webkitAnimationName = 'moveHorizontal'; - style.webkitAnimationDuration = '1s'; - style.webkitAnimationIterationCount = 'infinite'; - style.webkitAnimationDirection = 'alternate-reverse'; - style.webkitAnimationFillMode = 'forwards'; + style.animationName = 'moveHorizontal'; + style.animationDuration = '1s'; + style.animationIterationCount = 'infinite'; + style.animationDirection = 'alternate-reverse'; + style.animationFillMode = 'forwards'; }; var XFlyingSushiMonster = document.registerElement('x-flying-sushi-monster', { diff --git a/public/stage2/.eslintrc b/public/stage2/.eslintrc deleted file mode 100644 index ddbc632c..00000000 --- a/public/stage2/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "mocha": true - }, - "globals": { - "$": false, - "jQuery": false, - "HTMLCollection": false - } -} diff --git a/public/stage2/tests.js b/public/stage2/tests.js index 3493dbff..b430dfdc 100644 --- a/public/stage2/tests.js +++ b/public/stage2/tests.js @@ -182,7 +182,7 @@ describe('ステージ2(意図した通りに DOM 要素の属性・テキス }); - it('5 番の要素を jQuery を使って時計回り方向に 10 度回転させる', function() { + it('11 番の要素を jQuery を使って時計回り方向に 10 度回転させる', function() { // ここにコードを記述してください。 // 変更した DOM 要素は $element 変数に代入してください。 @@ -198,7 +198,7 @@ describe('ステージ2(意図した通りに DOM 要素の属性・テキス }); - it('6 番の要素を jQuery を使って上に 20px 移動させる', function() { + it('12 番の要素を jQuery を使って上に 20px 移動させる', function() { // ここにコードを記述してください。 // 変更した DOM 要素は $element 変数に代入してください。 diff --git a/public/stage3/.eslintrc b/public/stage3/.eslintrc deleted file mode 100644 index ddbc632c..00000000 --- a/public/stage3/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "mocha": true - }, - "globals": { - "$": false, - "jQuery": false, - "HTMLCollection": false - } -} diff --git a/public/stage4/.eslintrc b/public/stage4/.eslintrc deleted file mode 100644 index ddbc632c..00000000 --- a/public/stage4/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "mocha": true - }, - "globals": { - "$": false, - "jQuery": false, - "HTMLCollection": false - } -} diff --git a/public/stage4/tests.js b/public/stage4/tests.js index 599536b6..848bc074 100644 --- a/public/stage4/tests.js +++ b/public/stage4/tests.js @@ -103,8 +103,7 @@ describe('ステージ4(意図通りにイベントを利用できる)', fun function createClickEvent() { var event = document.createEvent('MouseEvents'); - event.initMouseEvent('click', true, true, window, - 0, 0, 0, 80, 20, false, false, false, false, 0, null); + event.initEvent('click', false, true); return event; } diff --git a/public/stage5/.eslintrc b/public/stage5/.eslintrc index f2c8d189..e7c4b54d 100644 --- a/public/stage5/.eslintrc +++ b/public/stage5/.eslintrc @@ -1,13 +1,6 @@ { - "env": { - "browser": true, - "mocha": true - }, "globals": { - "$": false, - "jQuery": false, "fetch": false, - "Promise": false, - "HTMLCollection": false + "Promise": false } } diff --git a/public/stage5/tests.js b/public/stage5/tests.js index 06344c20..568548d3 100644 --- a/public/stage5/tests.js +++ b/public/stage5/tests.js @@ -74,7 +74,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)', // }); - return expect(promisedFriends).to.eventually.deep.equal(['PYXC-PJ']); + return expect(promisedFriends).to.eventually.have.length(1) + .and.have.members(['PYXC-PJ']); }); @@ -86,9 +87,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)', var promisedFriends = 'change me!'; - return expect(promisedFriends).to.eventually.deep.equal( - ['jisp', 'TeJaS'] - ); + return expect(promisedFriends).to.eventually.have.length(2) + .and.have.members(['jisp', 'TeJaS']); }); @@ -100,7 +100,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)', var promisedFriends = 'change me!'; - return expect(promisedFriends).to.eventually.deep.equal(['TypeScript']); + return expect(promisedFriends).to.eventually.have.length(1) + .and.have.members(['TypeScript']); }); @@ -112,9 +113,14 @@ describe('ステージ5(意図通りに非同期処理を利用できる)', var promisedFriends = 'change me!'; - return expect(promisedFriends).to.eventually.deep.equal( - ['Taijilang', 'purescript', 'Wind.js', 'ScriptBlocks', 'jangaroo'] - ); + return expect(promisedFriends).to.eventually.have.length(5) + .and.have.members([ + 'Taijilang', + 'purescript', + 'Wind.js', + 'ScriptBlocks', + 'jangaroo' + ]); }); @@ -152,7 +158,11 @@ describe('ステージ5(意図通りに非同期処理を利用できる)', // 作成した promise を mostPopularRepos 変数に代入してください。 - return expect(mostPopularRepos).to.eventually.have.length(2); + return expect(mostPopularRepos).to.eventually.have.length(2) + .and.satisfy(function(names) { + return typeof names[0] === 'string' && + typeof names[1] === 'string'; + }); // Github API に関する参考情報 // https://developer.github.com/v3/search diff --git a/public/stage6/.eslintrc b/public/stage6/.eslintrc index f6d7f11c..73879260 100644 --- a/public/stage6/.eslintrc +++ b/public/stage6/.eslintrc @@ -1,17 +1,10 @@ { - "env": { - "browser": true, - "mocha": true - }, "rules": { - "no-unused-expressions": 0, + // シャレオツコードの意図が undefined 代入だとわかりやすいので許可 "no-undef-init": 0 }, "globals": { - "$": false, - "jQuery": false, "fetch": false, - "Promise": false, - "HTMLCollection": false + "Promise": false } } diff --git a/public/stage7/.eslintrc b/public/stage7/.eslintrc index f6d7f11c..7d7a8067 100644 --- a/public/stage7/.eslintrc +++ b/public/stage7/.eslintrc @@ -1,17 +1,16 @@ { - "env": { - "browser": true, - "mocha": true - }, "rules": { - "no-unused-expressions": 0, - "no-undef-init": 0 + // undefined 上書き問題のため、明示的な undefined 代入を許可 + "no-undef-init": 0, + + // == 演算子の振る舞いの問題の警告は誤警告 + "yoda": 0, + + // truthy, falsey を判定する問題のため、定数式を許可 + "no-constant-condition": 0 }, "globals": { - "$": false, - "jQuery": false, "fetch": false, - "Promise": false, - "HTMLCollection": false + "Promise": false } } diff --git a/public/stage7/tests.js b/public/stage7/tests.js index 0276df98..3a72ba58 100644 --- a/public/stage7/tests.js +++ b/public/stage7/tests.js @@ -1,7 +1,7 @@ describe('ステージ7(よくあるJSのイディオムを読める)', function() { 'use strict'; - it('クロージャー', function() { + describe('クロージャー', function() { var createCounter = function() { var i = 0; @@ -12,32 +12,64 @@ describe('ステージ7(よくあるJSのイディオムを読める)', func var counter = createCounter(); - expect(counter()).to.equal(/* ここに値を書き込んでください */); - expect(counter()).to.equal(/* ここに値を書き込んでください */); - expect(counter()).to.equal(/* ここに値を書き込んでください */); + + it('1回目の値がわかる', function() { + expect(counter()).to.equal(/* ここに値を書き込んでください */); + }); + + + it('2回目の値がわかる', function() { + expect(counter()).to.equal(/* ここに値を書き込んでください */); + }); + + + it('3回目の値がわかる', function() { + expect(counter()).to.equal(/* ここに値を書き込んでください */); + }); }); - it('ショートサーキット演算', function() { - expect(true && 'default').to.equal(/* ここに値を書き込んでください */); + describe('ショートサーキット演算', function() { + it("true && 'default' の結果がわかる", function() { + expect(true && 'default').to.equal(/* ここに値を書き込んでください */); + }); - expect(false || 'default').to.equal(/* ここに値を書き込んでください */); - expect(0 || 'default').to.equal(/* ここに値を書き込んでください */); + it("false || 'default' の結果がわかる", function() { + expect(false || 'default').to.equal(/* ここに値を書き込んでください */); + }); - expect({} || 'default').to.deep.equal(/* ここに値を書き込んでください */); - var func = function(arg) { - return arg || {}; - }; + it("0 || 'default' の結果がわかる", function() { + expect(0 || 'default').to.equal(/* ここに値を書き込んでください */); + }); + + + it("{} || 'default' の結果がわかる", function() { + expect({} || 'default').to.deep.equal(/* ここに値を書き込んでください */); + }); + + + it('default 引数コードが読める1', function() { + var func = function(arg) { + return arg || { foo: 'foo' }; + }; - expect(func({ foo: 'bar' })).to.deep.equal(/* ここに値を書き込んでください */); + expect(func({ foo: 'bar' })).to.deep.equal(/* ここに値を書き込んでください */); + }); - expect(func()).to.deep.equal(/* ここに値を書き込んでください */); + + it('default 引数コードが読める2', function() { + var func = function(arg) { + return arg || { foo: 'foo' }; + }; + + expect(func()).to.deep.equal(/* ここに値を書き込んでください */); + }); }); - it('無名即時実行関数', function() { + it('無名即時実行関数が読める', function() { var num = 0; (function() { @@ -48,7 +80,7 @@ describe('ステージ7(よくあるJSのイディオムを読める)', func }); - it('setTimeout 0 パターン', function() { + it('setTimeout 0 パターンが読める', function() { var num = 0; setTimeout(function() { @@ -59,18 +91,33 @@ describe('ステージ7(よくあるJSのイディオムを読める)', func }); - it('真偽値変換', function() { + describe('真偽値変換', function() { var truthy = 1; var falsey = 0; - expect(!!truthy).to.equal(/* ここに値を書き込んでください */); - expect(!!falsey).to.equal(/* ここに値を書き込んでください */); - expect(Boolean(truthy)).to.equal(/* ここに値を書き込んでください */); - expect(Boolean(falsey)).to.equal(/* ここに値を書き込んでください */); + + it('!!truthy の結果がわかる', function() { + expect(!!truthy).to.equal(/* ここに値を書き込んでください */); + }); + + + it('!!falsey の結果がわかる', function() { + expect(!!falsey).to.equal(/* ここに値を書き込んでください */); + }); + + + it('Boolean(truthy) の結果がわかる', function() { + expect(Boolean(truthy)).to.equal(/* ここに値を書き込んでください */); + }); + + + it('Boolean(falsey) の結果がわかる', function() { + expect(Boolean(falsey)).to.equal(/* ここに値を書き込んでください */); + }); }); - it('prototype 継承', function() { + describe('prototype 継承', function() { var GrandParent = function() { this.grandParent = true; }; @@ -88,108 +135,262 @@ describe('ステージ7(よくあるJSのイディオムを読める)', func var parent = new Parent(); var child = new Child(); - expect(parent.grandParent).to.equal(/* ここに値を書き込んでください */); - expect(parent.child).to.equal(/* ここに値を書き込んでください */); + it('parent.grandParent の値がわかる', function() { + expect(parent.grandParent).to.equal(/* ここに値を書き込んでください */); + }); + - expect(child.grandParent).to.equal(/* ここに値を書き込んでください */); + it('parent.child の値がわかる', function() { + expect(parent.child).to.equal(/* ここに値を書き込んでください */); + }); - expect(child.parent).to.equal(/* ここに値を書き込んでください */); + + it('child.grandParent の値がわかる', function() { + expect(child.grandParent).to.equal(/* ここに値を書き込んでください */); + }); + + + it('child.parent の値がわかる', function() { + expect(child.parent).to.equal(/* ここに値を書き込んでください */); + }); }); }); -describe.skip('闇', function() { - it('== 演算子', function() { - expect('10' == 10) - .to.equal(/* ここに値を書き込んでください */); - expect(null == undefined) - .to.equal(/* ここに値を書き込んでください */); +describe.skip('あなたの闇のJS力', function() { + // .skip を外せば始められます + + describe('ゆるふわ == 演算子', function() { + it("'10' == 10 の振る舞いがわかる", function() { + expect('10' == 10) + .to.equal(/* ここに値を書き込んでください */); + }); - expect(null == false) - .to.equal(/* ここに値を書き込んでください */); - expect(true == 1) - .to.equal(/* ここに値を書き込んでください */); + it('null == undefined の振る舞いがわかる', function() { + expect(null == undefined) + .to.equal(/* ここに値を書き込んでください */); + }); - expect([0, 1] == 0) - .to.equal(/* ここに値を書き込んでください */); - expect([1] == 1) - .to.equal(/* ここに値を書き込んでください */); + it('null == false の振る舞いがわかる', function() { + expect(null == false) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('true == 1 の振る舞いがわかる', function() { + expect(true == 1) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('true == 10 の振る舞いがわかる', function() { + expect(true == 10) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('[0, 1] == 0 の振る舞いがわかる', function() { + expect([0, 1] == 0) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('[1] == 1 の振る舞いがわかる', function() { + expect([1] == 1) + .to.equal(/* ここに値を書き込んでください */); + }); }); - it('new 演算子', function() { - expect(Boolean(false) ? true : false) - .to.equal(/* ここに値を書き込んでください */); + describe('意図しない truthy/falsey', function() { + it('Boolean(false) が truthy/falsey のどちらなのかわかる', function() { + expect(Boolean(false) ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('Boolean(0) が truthy/falsey のどちらなのかわかる', function() { + expect(Boolean(0) ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('new Boolean(0) が truthy/falsey のどちらなのかわかる', function() { + expect(new Boolean(0) ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it("'abc' が truthy/falsey のどちらなのかわかる", function() { + expect('abc' ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it("'' が truthy/falsey のどちらなのかわかる", function() { + expect('' ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); - expect(Boolean(0) ? true : false) - .to.equal(/* ここに値を書き込んでください */); - expect(new Boolean(0) ? true : false) - .to.equal(/* ここに値を書き込んでください */); + it('String(0) が truthy/falsey のどちらなのかわかる', function() { + expect(String(0) ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); - expect('abc' ? true : false) - .to.equal(/* ここに値を書き込んでください */); - expect('' ? true : false) - .to.equal(/* ここに値を書き込んでください */); + it("String('') が truthy/falsey のどちらなのかわかる", function() { + expect(String('') ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); - expect(String(0) ? true : false) - .to.equal(/* ここに値を書き込んでください */); - expect(String('') ? true : false) - .to.equal(/* ここに値を書き込んでください */); + it('new String(0) が truthy/falsey のどちらなのかわかる', function() { + expect(new String(0) ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); - expect(new String(0) ? true : false) - .to.equal(/* ここに値を書き込んでください */); - expect(new String('') ? true : false) - .to.equal(/* ここに値を書き込んでください */); + it("new String('') が truthy/falsey のどちらなのかわかる", function() { + expect(new String('') ? true : false) + .to.equal(/* ここに値を書き込んでください */); + }); }); - it('暗黙のキャスト', function() { - expect(+'10' === '10').to.equal(/* ここに値を書き込んでください */); + describe('読めないキャスト万歳!', function() { + it("10 + '' の値がわかる", function() { + expect(10 + '').to.equal(/* ここに値を書き込んでください */); + }); + + + it("+'10' の値がわかる", function() { + expect(+'10').to.equal(/* ここに値を書き込んでください */); + }); + + + it("'10.1'|0 の値がわかる", function() { + expect('10.1'|0).to.equal(/* ここに値を書き込んでください */); + }); + + + it("Array.prototype.slice.call({ length: 2, 0: 'foo', 1: 'bar' }) の値がわかる", function() { + var obj = { length: 2, 0: 'foo', 1: 'bar' }; + + expect(Array.prototype.slice.call(obj)) + .to.deep.equal(/* ここに値を書き込んでください */); + }); - expect(10 === (10 + '')).to.equal(/* ここに値を書き込んでください */); + + it('+(new Date()) の型がわかる', function() { + expect(typeof +(new Date())) + .to.equal(/* ここに値を書き込んでください */); + }); + + + it('(new Date()) + 0 の型がわかる', function() { + expect(typeof ((new Date()) + 0)) + .to.equal(/* ここに値を書き込んでください */); + }); }); - it('Array コンストラクタ', function() { - expect(Array(3)).to.deep.equal(/* ここに値を書き込んでください */); + describe('ダブルスタンダード Array コンストラクタ', function() { + it('Array(3) が作成する配列の長さがわかる', function() { + expect(Array(3)).to.have.length(/* ここに値を書き込んでください */); + }); + + + it('Array(3) が作成する配列の0番目の要素がわかる', function() { + expect(Array(3)[0]).to.equal(/* ここに値を書き込んでください */); + }); + + + it('Array(3) が作成する配列がわかる', function() { + expect(Array(3)).to.deep.equal(/* ここに値を書き込んでください */); + }); + + + it('Array(1, 2, 3) が作成する配列の長さがわかる', function() { + expect(Array(1, 2, 3)).to.have.length(/* ここに値を書き込んでください */); + }); - expect(Array(1, 2, 3)).to.deep.equal(/* ここに値を書き込んでください */); + + it('Array(1, 2, 3) が作成する配列の0番目の要素がわかる', function() { + expect(Array(1, 2, 3)[0]).to.equal(/* ここに値を書き込んでください */); + }); + + + it('Array(1, 2, 3) が作成する配列がわかる', function() { + expect(Array(1, 2, 3)).to.deep.equal(/* ここに値を書き込んでください */); + }); }); - it('with 文', function() { - var obj = { 'foo': undefined, 'undefined': true }; + describe('静的検査スレイヤー with 文', function() { + it("with ({ 'foo': 'bar' }) のもとで foo の値がわかる", function() { + var obj = { foo: 'bar' }; - with (obj) { - expect(obj.foo === undefined) - .to.equal(/* ここに値を書き込んでください */); - } + with (obj) { + expect(foo).to.equal(/* ここに値を書き込んでください */); + } + }); + + + it("with ({ 'foo': 'bar', 'undefined': 'bar' }) のもとで foo === undefined の結果がわかる", function() { + var obj = { 'foo': 'bar', 'undefined': 'bar' }; + + with (obj) { + expect(foo === undefined).to.equal(/* ここに値を書き込んでください */); + } + }); + + + it("with ({ 'foo': 'bar', 'null': 'bar' }) のもとで foo === null の結果がわかる", function() { + var obj = { 'foo': 'bar', 'null': 'bar' }; + + with (obj) { + expect(foo === null).to.equal(/* ここに値を書き込んでください */); + } + }); }); - it('typeof 演算子', function() { - expect(typeof 0).to.equal(/* ここに値を書き込んでください */); + describe('JavaScript のゆるふわ型判定', function() { + it('typeof 0 の結果がわかる', function() { + expect(typeof 0).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof true).to.equal(/* ここに値を書き込んでください */); + it('typeof true の結果がわかる', function() { + expect(typeof true).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof 'string').to.equal(/* ここに値を書き込んでください */); + it("typeof 'string' の結果がわかる", function() { + expect(typeof 'string').to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof function() {}).to.equal(/* ここに値を書き込んでください */); + it('typeof function() {} の結果がわかる', function() { + expect(typeof function() {}).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof {}).to.equal(/* ここに値を書き込んでください */); + it('typeof {} の結果がわかる', function() { + expect(typeof {}).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof []).to.equal(/* ここに値を書き込んでください */); + it('typeof [] の結果がわかる', function() { + expect(typeof []).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof undefined).to.equal(/* ここに値を書き込んでください */); + it('typeof undefined の結果がわかる', function() { + expect(typeof undefined).to.equal(/* ここに値を書き込んでください */); + }); - expect(typeof null).to.equal(/* ここに値を書き込んでください */); + it('typeof null の結果がわかる', function() { + expect(typeof null).to.equal(/* ここに値を書き込んでください */); + }); }); });