From 71cf954447252bdd4f38903c464d4f6b6b463847 Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Sun, 9 Aug 2015 15:48:42 +0100 Subject: [PATCH] Use babel to compile jsx --- gulpfile.js | 4 +- npm-shrinkwrap.json | 1669 +++++++++++++++++++++++++++---------------- package.json | 5 +- public/js/app.js | 1346 ++++++++++++++++++++++------------ 4 files changed, 1933 insertions(+), 1091 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index ad0e1db..e4e5d06 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,9 +1,9 @@ "use strict"; var gulp = require("gulp"); -var react = require("gulp-react"); var concat = require("gulp-concat"); var watch = require("gulp-watch"); +var babel = require("gulp-babel"); var plumber = require("gulp-plumber"); gulp.task('default', ['compile']); @@ -12,7 +12,7 @@ gulp.task('compile', function () { return gulp.src('lib/react/**') .pipe(plumber()) .pipe(concat('app.js')) - .pipe(react()) + .pipe(babel()) .pipe(gulp.dest('public/js/')); }); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 12585e3..f2abbc8 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "1.0.0", "dependencies": { "async": { - "version": "1.4.0", + "version": "1.4.1", "from": "async@~1.4.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.4.0.tgz" + "resolved": "https://registry.npmjs.org/async/-/async-1.4.1.tgz" }, "babel": { "version": "5.8.21", @@ -1105,7 +1105,7 @@ }, "debug": { "version": "2.2.0", - "from": "debug@2", + "from": "debug@~2.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", "dependencies": { "ms": { @@ -1198,7 +1198,7 @@ }, "qs": { "version": "4.0.0", - "from": "qs@4.0.0", + "from": "qs@~4.0.0", "resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz" }, "range-parser": { @@ -1515,7 +1515,7 @@ }, "gulp-util": { "version": "3.0.6", - "from": "gulp-util@~3", + "from": "gulp-util@^3.0.0", "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.6.tgz", "dependencies": { "array-differ": { @@ -1893,9 +1893,9 @@ } }, "minimist": { - "version": "1.1.2", + "version": "1.1.3", "from": "minimist@^1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" }, "orchestrator": { "version": "0.3.7", @@ -1909,7 +1909,7 @@ "dependencies": { "once": { "version": "1.3.2", - "from": "once@~1.3.0", + "from": "once@^1.3.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", "dependencies": { "wrappy": { @@ -2194,7 +2194,7 @@ }, "inherits": { "version": "2.0.1", - "from": "inherits@2", + "from": "inherits@~2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" } } @@ -2227,16 +2227,623 @@ } } }, - "gulp-concat": { - "version": "2.6.0", - "from": "gulp-concat@~2.6.0", - "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.0.tgz", + "gulp-babel": { + "version": "5.2.0", + "from": "gulp-babel@^5.2.0", + "resolved": "https://registry.npmjs.org/gulp-babel/-/gulp-babel-5.2.0.tgz", "dependencies": { - "concat-with-sourcemaps": { - "version": "1.0.2", - "from": "concat-with-sourcemaps@^1.0.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.2.tgz", + "babel-core": { + "version": "5.8.21", + "from": "babel-core@^5.8.19", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.21.tgz", "dependencies": { + "babel-plugin-constant-folding": { + "version": "1.0.1", + "from": "babel-plugin-constant-folding@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-constant-folding/-/babel-plugin-constant-folding-1.0.1.tgz" + }, + "babel-plugin-dead-code-elimination": { + "version": "1.0.2", + "from": "babel-plugin-dead-code-elimination@^1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz" + }, + "babel-plugin-eval": { + "version": "1.0.1", + "from": "babel-plugin-eval@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz" + }, + "babel-plugin-inline-environment-variables": { + "version": "1.0.1", + "from": "babel-plugin-inline-environment-variables@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-inline-environment-variables/-/babel-plugin-inline-environment-variables-1.0.1.tgz" + }, + "babel-plugin-jscript": { + "version": "1.0.4", + "from": "babel-plugin-jscript@^1.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz" + }, + "babel-plugin-member-expression-literals": { + "version": "1.0.1", + "from": "babel-plugin-member-expression-literals@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-member-expression-literals/-/babel-plugin-member-expression-literals-1.0.1.tgz" + }, + "babel-plugin-property-literals": { + "version": "1.0.1", + "from": "babel-plugin-property-literals@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-property-literals/-/babel-plugin-property-literals-1.0.1.tgz" + }, + "babel-plugin-proto-to-assign": { + "version": "1.0.4", + "from": "babel-plugin-proto-to-assign@^1.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-proto-to-assign/-/babel-plugin-proto-to-assign-1.0.4.tgz" + }, + "babel-plugin-react-constant-elements": { + "version": "1.0.3", + "from": "babel-plugin-react-constant-elements@^1.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-react-constant-elements/-/babel-plugin-react-constant-elements-1.0.3.tgz" + }, + "babel-plugin-react-display-name": { + "version": "1.0.3", + "from": "babel-plugin-react-display-name@^1.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-react-display-name/-/babel-plugin-react-display-name-1.0.3.tgz" + }, + "babel-plugin-remove-console": { + "version": "1.0.1", + "from": "babel-plugin-remove-console@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-console/-/babel-plugin-remove-console-1.0.1.tgz" + }, + "babel-plugin-remove-debugger": { + "version": "1.0.1", + "from": "babel-plugin-remove-debugger@^1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-debugger/-/babel-plugin-remove-debugger-1.0.1.tgz" + }, + "babel-plugin-runtime": { + "version": "1.0.7", + "from": "babel-plugin-runtime@^1.0.7", + "resolved": "https://registry.npmjs.org/babel-plugin-runtime/-/babel-plugin-runtime-1.0.7.tgz" + }, + "babel-plugin-undeclared-variables-check": { + "version": "1.0.2", + "from": "babel-plugin-undeclared-variables-check@^1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-undeclared-variables-check/-/babel-plugin-undeclared-variables-check-1.0.2.tgz", + "dependencies": { + "leven": { + "version": "1.0.2", + "from": "leven@^1.0.2", + "resolved": "https://registry.npmjs.org/leven/-/leven-1.0.2.tgz" + } + } + }, + "babel-plugin-undefined-to-void": { + "version": "1.1.6", + "from": "babel-plugin-undefined-to-void@^1.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz" + }, + "babylon": { + "version": "5.8.21", + "from": "babylon@^5.8.21", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.21.tgz" + }, + "bluebird": { + "version": "2.9.34", + "from": "bluebird@^2.9.33", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.34.tgz" + }, + "chalk": { + "version": "1.1.0", + "from": "chalk@^1.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.0.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.1.0", + "from": "ansi-styles@^2.1.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", + "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", + "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", + "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", + "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", + "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", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "convert-source-map": { + "version": "1.1.1", + "from": "convert-source-map@^1.1.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.1.tgz" + }, + "core-js": { + "version": "1.0.1", + "from": "core-js@^1.0.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.0.1.tgz" + }, + "debug": { + "version": "2.2.0", + "from": "debug@^2.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.1", + "from": "ms@0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + } + } + }, + "detect-indent": { + "version": "3.0.1", + "from": "detect-indent@^3.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz", + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "from": "get-stdin@^4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + }, + "minimist": { + "version": "1.1.3", + "from": "minimist@^1.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" + } + } + }, + "esutils": { + "version": "2.0.2", + "from": "esutils@^2.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + }, + "fs-readdir-recursive": { + "version": "0.1.2", + "from": "fs-readdir-recursive@^0.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz" + }, + "globals": { + "version": "6.4.1", + "from": "globals@^6.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-6.4.1.tgz" + }, + "home-or-tmp": { + "version": "1.0.0", + "from": "home-or-tmp@^1.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz", + "dependencies": { + "os-tmpdir": { + "version": "1.0.1", + "from": "os-tmpdir@^1.0.1", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" + }, + "user-home": { + "version": "1.1.1", + "from": "user-home@^1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + } + } + }, + "is-integer": { + "version": "1.0.4", + "from": "is-integer@^1.0.4", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.4.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.1", + "from": "is-finite@^1.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.0", + "from": "number-is-nan@^1.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + } + } + }, + "is-nan": { + "version": "1.1.0", + "from": "is-nan@^1.0.1", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.1.0.tgz", + "dependencies": { + "define-properties": { + "version": "1.1.1", + "from": "define-properties@^1.0.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.1.tgz", + "dependencies": { + "foreach": { + "version": "2.0.5", + "from": "foreach@^2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, + "object-keys": { + "version": "1.0.7", + "from": "object-keys@^1.0.7", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.7.tgz" + } + } + } + } + } + } + }, + "js-tokens": { + "version": "1.0.1", + "from": "js-tokens@1.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz" + }, + "json5": { + "version": "0.4.0", + "from": "json5@^0.4.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz" + }, + "line-numbers": { + "version": "0.2.0", + "from": "line-numbers@0.2.0", + "resolved": "https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.0.tgz", + "dependencies": { + "left-pad": { + "version": "0.0.3", + "from": "left-pad@0.0.3", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-0.0.3.tgz" + } + } + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@^2.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "from": "brace-expansion@^1.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", + "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" + } + } + } + } + }, + "output-file-sync": { + "version": "1.1.1", + "from": "output-file-sync@^1.1.0", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.1.tgz", + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@^0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "xtend": { + "version": "4.0.0", + "from": "xtend@^4.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + } + } + }, + "path-exists": { + "version": "1.0.0", + "from": "path-exists@^1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz" + }, + "path-is-absolute": { + "version": "1.0.0", + "from": "path-is-absolute@^1.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "private": { + "version": "0.1.6", + "from": "private@^0.1.6", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "regenerator": { + "version": "0.8.35", + "from": "regenerator@0.8.35", + "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.35.tgz", + "dependencies": { + "commoner": { + "version": "0.10.3", + "from": "commoner@~0.10.0", + "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.3.tgz", + "dependencies": { + "q": { + "version": "1.1.2", + "from": "q@~1.1.2", + "resolved": "https://registry.npmjs.org/q/-/q-1.1.2.tgz" + }, + "commander": { + "version": "2.5.1", + "from": "commander@~2.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.5.1.tgz" + }, + "graceful-fs": { + "version": "3.0.8", + "from": "graceful-fs@~3.0.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz" + }, + "glob": { + "version": "4.2.2", + "from": "glob@~4.2.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.2.2.tgz", + "dependencies": { + "inflight": { + "version": "1.0.4", + "from": "inflight@^1.0.4", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@1", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "minimatch": { + "version": "1.0.0", + "from": "minimatch@^1.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "dependencies": { + "lru-cache": { + "version": "2.6.5", + "from": "lru-cache@2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz" + }, + "sigmund": { + "version": "1.0.1", + "from": "sigmund@~1.0.0", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" + } + } + }, + "once": { + "version": "1.3.2", + "from": "once@^1.3.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.1", + "from": "wrappy@1", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@~0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "install": { + "version": "0.1.8", + "from": "install@~0.1.7", + "resolved": "https://registry.npmjs.org/install/-/install-0.1.8.tgz" + }, + "iconv-lite": { + "version": "0.4.11", + "from": "iconv-lite@~0.4.5", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz" + } + } + }, + "defs": { + "version": "1.1.0", + "from": "defs@~1.1.0", + "resolved": "https://registry.npmjs.org/defs/-/defs-1.1.0.tgz", + "dependencies": { + "alter": { + "version": "0.2.0", + "from": "alter@~0.2.0", + "resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz", + "dependencies": { + "stable": { + "version": "0.1.5", + "from": "stable@~0.1.3", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.5.tgz" + } + } + }, + "ast-traverse": { + "version": "0.1.1", + "from": "ast-traverse@~0.1.1", + "resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz" + }, + "breakable": { + "version": "1.0.0", + "from": "breakable@~1.0.0", + "resolved": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz" + }, + "esprima-fb": { + "version": "8001.1001.0-dev-harmony-fb", + "from": "esprima-fb@~8001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-8001.1001.0-dev-harmony-fb.tgz" + }, + "simple-fmt": { + "version": "0.1.0", + "from": "simple-fmt@~0.1.0", + "resolved": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz" + }, + "simple-is": { + "version": "0.2.0", + "from": "simple-is@~0.2.0", + "resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz" + }, + "stringmap": { + "version": "0.2.2", + "from": "stringmap@~0.2.2", + "resolved": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz" + }, + "stringset": { + "version": "0.2.1", + "from": "stringset@~0.2.1", + "resolved": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz" + }, + "tryor": { + "version": "0.1.2", + "from": "tryor@~0.1.2", + "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz" + }, + "yargs": { + "version": "1.3.3", + "from": "yargs@~1.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.3.3.tgz" + } + } + }, + "esprima-fb": { + "version": "15001.1.0-dev-harmony-fb", + "from": "esprima-fb@~15001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz" + }, + "recast": { + "version": "0.10.24", + "from": "recast@0.10.24", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.24.tgz", + "dependencies": { + "ast-types": { + "version": "0.8.5", + "from": "ast-types@0.8.5", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.5.tgz" + } + } + }, + "through": { + "version": "2.3.8", + "from": "through@~2.3.6", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "regexpu": { + "version": "1.2.0", + "from": "regexpu@^1.1.2", + "resolved": "https://registry.npmjs.org/regexpu/-/regexpu-1.2.0.tgz", + "dependencies": { + "recast": { + "version": "0.10.27", + "from": "recast@^0.10.6", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.27.tgz", + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "from": "esprima-fb@~15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz" + }, + "ast-types": { + "version": "0.8.8", + "from": "ast-types@0.8.8", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.8.tgz" + } + } + }, + "regenerate": { + "version": "1.2.1", + "from": "regenerate@^1.2.1", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.2.1.tgz" + }, + "regjsgen": { + "version": "0.2.0", + "from": "regjsgen@^0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz" + }, + "regjsparser": { + "version": "0.1.4", + "from": "regjsparser@^0.1.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.4.tgz", + "dependencies": { + "jsesc": { + "version": "0.5.0", + "from": "jsesc@~0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" + } + } + } + } + }, + "repeating": { + "version": "1.1.3", + "from": "repeating@^1.1.2", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.1", + "from": "is-finite@^1.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.0", + "from": "number-is-nan@^1.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + } + } + } + } + }, + "resolve": { + "version": "1.1.6", + "from": "resolve@^1.1.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.6.tgz" + }, + "shebang-regex": { + "version": "1.0.0", + "from": "shebang-regex@^1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" + }, + "slash": { + "version": "1.0.0", + "from": "slash@^1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz" + }, "source-map": { "version": "0.4.4", "from": "source-map@^0.4.0", @@ -2248,12 +2855,46 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" } } + }, + "source-map-support": { + "version": "0.2.10", + "from": "source-map-support@^0.2.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz", + "dependencies": { + "source-map": { + "version": "0.1.32", + "from": "source-map@0.1.32", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.0", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" + } + } + } + } + }, + "to-fast-properties": { + "version": "1.0.1", + "from": "to-fast-properties@^1.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.1.tgz" + }, + "trim-right": { + "version": "1.0.1", + "from": "trim-right@^1.0.0", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz" + }, + "try-resolve": { + "version": "1.0.1", + "from": "try-resolve@^1.0.0", + "resolved": "https://registry.npmjs.org/try-resolve/-/try-resolve-1.0.1.tgz" } } }, "gulp-util": { "version": "3.0.6", - "from": "gulp-util@^3.0.1", + "from": "gulp-util@^3.0.0", "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.6.tgz", "dependencies": { "array-differ": { @@ -2459,9 +3100,385 @@ } }, "minimist": { - "version": "1.1.2", + "version": "1.1.3", "from": "minimist@^1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" + }, + "multipipe": { + "version": "0.1.2", + "from": "multipipe@^0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "dependencies": { + "duplexer2": { + "version": "0.0.2", + "from": "duplexer2@0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "dependencies": { + "readable-stream": { + "version": "1.1.13", + "from": "readable-stream@~1.1.9", + "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", + "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.x", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@~2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + } + } + } + } + }, + "vinyl": { + "version": "0.5.1", + "from": "vinyl@^0.5.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.1.tgz", + "dependencies": { + "clone": { + "version": "1.0.2", + "from": "clone@^1.0.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@^0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + } + } + }, + "object-assign": { + "version": "3.0.0", + "from": "object-assign@^3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + }, + "replace-ext": { + "version": "0.0.1", + "from": "replace-ext@0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + }, + "through2": { + "version": "2.0.0", + "from": "through2@^2.0.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.0.tgz", + "dependencies": { + "readable-stream": { + "version": "2.0.2", + "from": "readable-stream@~2.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", + "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", + "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.2", + "from": "process-nextick-args@~1.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.2.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@~0.10.x", + "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", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" + } + } + }, + "xtend": { + "version": "4.0.0", + "from": "xtend@~4.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.1.4", + "from": "vinyl-sourcemaps-apply@^0.1.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.1.4.tgz", + "dependencies": { + "source-map": { + "version": "0.1.43", + "from": "source-map@^0.1.39", + "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" + } + } + } + } + } + } + }, + "gulp-concat": { + "version": "2.6.0", + "from": "gulp-concat@~2.6.0", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.0.tgz", + "dependencies": { + "concat-with-sourcemaps": { + "version": "1.0.2", + "from": "concat-with-sourcemaps@^1.0.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.2.tgz", + "dependencies": { + "source-map": { + "version": "0.4.4", + "from": "source-map@^0.4.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.0", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" + } + } + } + } + }, + "gulp-util": { + "version": "3.0.6", + "from": "gulp-util@^3.0.0", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.6.tgz", + "dependencies": { + "array-differ": { + "version": "1.0.0", + "from": "array-differ@^1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" + }, + "array-uniq": { + "version": "1.0.2", + "from": "array-uniq@^1.0.2", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" + }, + "beeper": { + "version": "1.1.0", + "from": "beeper@^1.0.0", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz" + }, + "chalk": { + "version": "1.1.0", + "from": "chalk@^1.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.0.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.1.0", + "from": "ansi-styles@^2.1.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", + "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", + "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", + "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", + "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", + "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", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "dateformat": { + "version": "1.0.11", + "from": "dateformat@^1.0.11", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "from": "get-stdin@*", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + }, + "meow": { + "version": "3.3.0", + "from": "meow@*", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.3.0.tgz", + "dependencies": { + "camelcase-keys": { + "version": "1.0.0", + "from": "camelcase-keys@^1.0.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz", + "dependencies": { + "camelcase": { + "version": "1.2.1", + "from": "camelcase@^1.0.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + }, + "map-obj": { + "version": "1.0.1", + "from": "map-obj@^1.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" + } + } + }, + "indent-string": { + "version": "1.2.2", + "from": "indent-string@^1.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", + "dependencies": { + "repeating": { + "version": "1.1.3", + "from": "repeating@^1.1.0", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.1", + "from": "is-finite@^1.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.0", + "from": "number-is-nan@^1.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + } + } + } + } + } + } + } + } + } + } + }, + "lodash._reescape": { + "version": "3.0.0", + "from": "lodash._reescape@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "from": "lodash._reevaluate@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "from": "lodash._reinterpolate@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + }, + "lodash.template": { + "version": "3.6.2", + "from": "lodash.template@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "dependencies": { + "lodash._basecopy": { + "version": "3.0.1", + "from": "lodash._basecopy@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "lodash._basetostring": { + "version": "3.0.1", + "from": "lodash._basetostring@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "lodash._basevalues": { + "version": "3.0.0", + "from": "lodash._basevalues@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "from": "lodash._isiterateecall@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "lodash.escape": { + "version": "3.0.0", + "from": "lodash.escape@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.0.0.tgz" + }, + "lodash.keys": { + "version": "3.1.2", + "from": "lodash.keys@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "dependencies": { + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "lodash.isarguments": { + "version": "3.0.4", + "from": "lodash.isarguments@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz" + }, + "lodash.isarray": { + "version": "3.0.4", + "from": "lodash.isarray@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + } + } + }, + "lodash.restparam": { + "version": "3.6.1", + "from": "lodash.restparam@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "lodash.templatesettings": { + "version": "3.1.0", + "from": "lodash.templatesettings@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.0.tgz" + } + } + }, + "minimist": { + "version": "1.1.3", + "from": "minimist@^1.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" }, "multipipe": { "version": "0.1.2", @@ -2584,7 +3601,7 @@ }, "through2": { "version": "0.6.5", - "from": "through2@^0.6.3", + "from": "through2@~0.6", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "dependencies": { "readable-stream": { @@ -2836,9 +3853,9 @@ } }, "minimist": { - "version": "1.1.2", + "version": "1.1.3", "from": "minimist@^1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" }, "multipipe": { "version": "0.1.2", @@ -3000,407 +4017,6 @@ } } }, - "gulp-react": { - "version": "3.0.1", - "from": "gulp-react@~3.0.1", - "resolved": "https://registry.npmjs.org/gulp-react/-/gulp-react-3.0.1.tgz", - "dependencies": { - "gulp-util": { - "version": "3.0.6", - "from": "gulp-util@^3.0.0", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.6.tgz", - "dependencies": { - "array-differ": { - "version": "1.0.0", - "from": "array-differ@^1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" - }, - "array-uniq": { - "version": "1.0.2", - "from": "array-uniq@^1.0.2", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" - }, - "beeper": { - "version": "1.1.0", - "from": "beeper@^1.0.0", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz" - }, - "chalk": { - "version": "1.1.0", - "from": "chalk@^1.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.0.tgz", - "dependencies": { - "ansi-styles": { - "version": "2.1.0", - "from": "ansi-styles@^2.1.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", - "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", - "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", - "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", - "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", - "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", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - } - }, - "dateformat": { - "version": "1.0.11", - "from": "dateformat@^1.0.11", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "from": "get-stdin@*", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "meow": { - "version": "3.3.0", - "from": "meow@*", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.3.0.tgz", - "dependencies": { - "camelcase-keys": { - "version": "1.0.0", - "from": "camelcase-keys@^1.0.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz", - "dependencies": { - "camelcase": { - "version": "1.2.1", - "from": "camelcase@^1.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" - }, - "map-obj": { - "version": "1.0.1", - "from": "map-obj@^1.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" - } - } - }, - "indent-string": { - "version": "1.2.2", - "from": "indent-string@^1.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", - "dependencies": { - "repeating": { - "version": "1.1.3", - "from": "repeating@^1.1.0", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", - "dependencies": { - "is-finite": { - "version": "1.0.1", - "from": "is-finite@^1.0.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", - "dependencies": { - "number-is-nan": { - "version": "1.0.0", - "from": "number-is-nan@^1.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - } - } - } - } - } - } - } - } - } - } - }, - "lodash._reescape": { - "version": "3.0.0", - "from": "lodash._reescape@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" - }, - "lodash._reevaluate": { - "version": "3.0.0", - "from": "lodash._reevaluate@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "from": "lodash._reinterpolate@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" - }, - "lodash.template": { - "version": "3.6.2", - "from": "lodash.template@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "dependencies": { - "lodash._basecopy": { - "version": "3.0.1", - "from": "lodash._basecopy@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" - }, - "lodash._basetostring": { - "version": "3.0.1", - "from": "lodash._basetostring@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "lodash._basevalues": { - "version": "3.0.0", - "from": "lodash._basevalues@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "from": "lodash._isiterateecall@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "lodash.escape": { - "version": "3.0.0", - "from": "lodash.escape@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.0.0.tgz" - }, - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "dependencies": { - "lodash._getnative": { - "version": "3.9.1", - "from": "lodash._getnative@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" - }, - "lodash.isarguments": { - "version": "3.0.4", - "from": "lodash.isarguments@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz" - }, - "lodash.isarray": { - "version": "3.0.4", - "from": "lodash.isarray@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" - } - } - }, - "lodash.restparam": { - "version": "3.6.1", - "from": "lodash.restparam@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" - }, - "lodash.templatesettings": { - "version": "3.1.0", - "from": "lodash.templatesettings@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.0.tgz" - } - } - }, - "minimist": { - "version": "1.1.2", - "from": "minimist@^1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.2.tgz" - }, - "multipipe": { - "version": "0.1.2", - "from": "multipipe@^0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "dependencies": { - "duplexer2": { - "version": "0.0.2", - "from": "duplexer2@0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "dependencies": { - "readable-stream": { - "version": "1.1.13", - "from": "readable-stream@~1.1.9", - "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", - "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.x", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@~2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - } - } - } - } - } - } - }, - "object-assign": { - "version": "3.0.0", - "from": "object-assign@^3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" - }, - "replace-ext": { - "version": "0.0.1", - "from": "replace-ext@0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" - }, - "through2": { - "version": "2.0.0", - "from": "through2@^2.0.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.0.tgz", - "dependencies": { - "readable-stream": { - "version": "2.0.2", - "from": "readable-stream@~2.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", - "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", - "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.2", - "from": "process-nextick-args@~1.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.2.tgz" - }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@~0.10.x", - "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", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz" - } - } - }, - "xtend": { - "version": "4.0.0", - "from": "xtend@~4.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" - } - } - }, - "vinyl": { - "version": "0.5.1", - "from": "vinyl@^0.5.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.1.tgz", - "dependencies": { - "clone": { - "version": "1.0.2", - "from": "clone@^1.0.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" - }, - "clone-stats": { - "version": "0.0.1", - "from": "clone-stats@^0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" - } - } - } - } - }, - "object-assign": { - "version": "2.1.1", - "from": "object-assign@^2.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@^0.6.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "dependencies": { - "readable-stream": { - "version": "1.0.33", - "from": "readable-stream@>=1.0.33-1 <1.1.0-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", - "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.x", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@~2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - } - } - }, - "xtend": { - "version": "4.0.0", - "from": "xtend@>=4.0.0 <4.1.0-0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" - } - } - }, - "vinyl-sourcemaps-apply": { - "version": "0.1.4", - "from": "vinyl-sourcemaps-apply@^0.1.4", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.1.4.tgz", - "dependencies": { - "source-map": { - "version": "0.1.43", - "from": "source-map@^0.1.39", - "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" - } - } - } - } - } - } - }, "gulp-watch": { "version": "4.3.4", "from": "gulp-watch@~4.3.4", @@ -3713,14 +4329,14 @@ } }, "fsevents": { - "version": "0.3.7", + "version": "0.3.8", "from": "fsevents@^0.3.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-0.3.7.tgz", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-0.3.8.tgz", "dependencies": { "nan": { - "version": "1.9.0", - "from": "nan@^1.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-1.9.0.tgz" + "version": "2.0.4", + "from": "nan@^2.0.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.0.4.tgz" } } } @@ -3800,7 +4416,7 @@ }, "gulp-util": { "version": "3.0.6", - "from": "gulp-util@~3", + "from": "gulp-util@^3.0.0", "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.6.tgz", "dependencies": { "array-differ": { @@ -4006,9 +4622,9 @@ } }, "minimist": { - "version": "1.1.2", + "version": "1.1.3", "from": "minimist@^1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" }, "multipipe": { "version": "0.1.2", @@ -4189,7 +4805,7 @@ }, "mongoose": { "version": "4.1.1", - "from": "mongoose@^4.1.1", + "from": "mongoose@~4.1.1", "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.1.1.tgz", "dependencies": { "async": { @@ -4203,13 +4819,13 @@ "resolved": "https://registry.npmjs.org/bson/-/bson-0.3.2.tgz", "dependencies": { "bson-ext": { - "version": "0.1.10", + "version": "0.1.12", "from": "bson-ext@~0.1", - "resolved": "https://registry.npmjs.org/bson-ext/-/bson-ext-0.1.10.tgz", + "resolved": "https://registry.npmjs.org/bson-ext/-/bson-ext-0.1.12.tgz", "dependencies": { "nan": { "version": "1.8.4", - "from": "nan@~1.8", + "from": "nan@~1.8.0", "resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz" }, "node-pre-gyp": { @@ -4283,7 +4899,7 @@ }, "inherits": { "version": "2.0.1", - "from": "inherits@2", + "from": "inherits@~2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" } } @@ -4427,7 +5043,7 @@ }, "inherits": { "version": "2.0.1", - "from": "inherits@~2.0.1", + "from": "inherits@2", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" }, "minimatch": { @@ -4614,7 +5230,7 @@ }, "inherits": { "version": "2.0.1", - "from": "inherits@2", + "from": "inherits@~2.0.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" } } @@ -4653,9 +5269,9 @@ "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-1.2.0.tgz", "dependencies": { "bson": { - "version": "0.4.8", + "version": "0.4.11", "from": "bson@~0.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-0.4.8.tgz" + "resolved": "https://registry.npmjs.org/bson/-/bson-0.4.11.tgz" }, "kerberos": { "version": "0.0.12", @@ -4802,173 +5418,6 @@ } } }, - "react-tools": { - "version": "0.13.3", - "from": "react-tools@~0.13.3", - "resolved": "https://registry.npmjs.org/react-tools/-/react-tools-0.13.3.tgz", - "dependencies": { - "commoner": { - "version": "0.10.3", - "from": "commoner@^0.10.0", - "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.3.tgz", - "dependencies": { - "q": { - "version": "1.1.2", - "from": "q@~1.1.2", - "resolved": "https://registry.npmjs.org/q/-/q-1.1.2.tgz" - }, - "recast": { - "version": "0.10.26", - "from": "recast@~0.10.0", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.26.tgz", - "dependencies": { - "esprima-fb": { - "version": "15001.1.0-dev-harmony-fb", - "from": "esprima-fb@~15001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz" - }, - "source-map": { - "version": "0.4.4", - "from": "source-map@~0.4.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "dependencies": { - "amdefine": { - "version": "1.0.0", - "from": "amdefine@>=0.0.4", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" - } - } - }, - "ast-types": { - "version": "0.8.7", - "from": "ast-types@0.8.7", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.7.tgz" - } - } - }, - "commander": { - "version": "2.5.1", - "from": "commander@~2.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.5.1.tgz" - }, - "graceful-fs": { - "version": "3.0.8", - "from": "graceful-fs@^3.0.1", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz" - }, - "glob": { - "version": "4.2.2", - "from": "glob@~4.2.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.2.2.tgz", - "dependencies": { - "inflight": { - "version": "1.0.4", - "from": "inflight@^1.0.4", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", - "dependencies": { - "wrappy": { - "version": "1.0.1", - "from": "wrappy@1", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - } - } - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@~2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "minimatch": { - "version": "1.0.0", - "from": "minimatch@^1.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", - "dependencies": { - "lru-cache": { - "version": "2.6.5", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz" - }, - "sigmund": { - "version": "1.0.1", - "from": "sigmund@~1.0.0", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" - } - } - }, - "once": { - "version": "1.3.2", - "from": "once@^1.3.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", - "dependencies": { - "wrappy": { - "version": "1.0.1", - "from": "wrappy@1", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - } - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "from": "mkdirp@^0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "dependencies": { - "minimist": { - "version": "0.0.8", - "from": "minimist@0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - } - } - }, - "private": { - "version": "0.1.6", - "from": "private@~0.1.6", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" - }, - "install": { - "version": "0.1.8", - "from": "install@~0.1.7", - "resolved": "https://registry.npmjs.org/install/-/install-0.1.8.tgz" - }, - "iconv-lite": { - "version": "0.4.11", - "from": "iconv-lite@~0.4.5", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz" - } - } - }, - "jstransform": { - "version": "10.1.0", - "from": "jstransform@^10.1.0", - "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-10.1.0.tgz", - "dependencies": { - "base62": { - "version": "0.1.1", - "from": "base62@0.1.1", - "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz" - }, - "esprima-fb": { - "version": "13001.1001.0-dev-harmony-fb", - "from": "esprima-fb@13001.1001.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-13001.1001.0-dev-harmony-fb.tgz" - }, - "source-map": { - "version": "0.1.31", - "from": "source-map@0.1.31", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", - "dependencies": { - "amdefine": { - "version": "1.0.0", - "from": "amdefine@>=0.0.4", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" - } - } - } - } - } - } - }, "request": { "version": "2.60.0", "from": "request@~2.60.0", @@ -5382,7 +5831,7 @@ }, "nan": { "version": "1.8.4", - "from": "nan@~1.8.0", + "from": "nan@1.8.x", "resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz" } } @@ -5399,7 +5848,7 @@ }, "nan": { "version": "1.8.4", - "from": "nan@~1.8.0", + "from": "nan@1.8.x", "resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz" } } diff --git a/package.json b/package.json index 0fff4f9..0215194 100644 --- a/package.json +++ b/package.json @@ -26,20 +26,19 @@ "homepage": "https://github.com/cblanc/sws_gathers", "dependencies": { "async": "~1.4.0", + "babel": "~5.8.21", "express": "~4.13.1", "express-handlebars": "~2.0.1", "extend": "~3.0.0", "gulp": "~3.9.0", + "gulp-babel": "^5.2.0", "gulp-concat": "~2.6.0", "gulp-plumber": "~1.0.1", - "gulp-react": "~3.0.1", "gulp-watch": "~4.3.4", "javascript-state-machine": "~2.3.5", "lodash": "~3.10.0", "mongoose": "~4.1.1", "morgan": "~1.6.1", - "react-tools": "~0.13.3", - "babel": "~5.8.21", "request": "~2.60.0", "serve-favicon": "~2.3.0", "socket.io": "~1.3.5", diff --git a/public/js/app.js b/public/js/app.js index f19bfa8..ba45b1b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,14 +1,18 @@ "use strict"; -var VoteButton = React.createClass({displayName: "VoteButton", - cancelVote: function (e) { +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var VoteButton = React.createClass({ + displayName: "VoteButton", + + cancelVote: function cancelVote(e) { socket.emit("gather:vote", { leader: { candidate: null } }); }, - vote: function (e) { + vote: function vote(e) { e.preventDefault(); socket.emit("gather:vote", { leader: { @@ -16,115 +20,155 @@ var VoteButton = React.createClass({displayName: "VoteButton", } }); }, - render: function () { + render: function render() { if (this.props.currentGatherer === null) { return false; } if (this.props.currentGatherer.leaderVote === this.props.candidate.id) { - return ( - React.createElement("button", { - onClick: this.cancelVote, - className: "btn btn-xs btn-success"}, "Voted" - ) + return React.createElement( + "button", + { + onClick: this.cancelVote, + className: "btn btn-xs btn-success" }, + "Voted" ); } else { - return ( - React.createElement("button", { - onClick: this.vote, - className: "btn btn-xs btn-default", - value: this.props.candidate.id}, "Vote" - ) + return React.createElement( + "button", + { + onClick: this.vote, + className: "btn btn-xs btn-default", + value: this.props.candidate.id }, + "Vote" ); } } }); -var SelectPlayerButton = React.createClass({displayName: "SelectPlayerButton", - selectPlayer: function (e) { +var SelectPlayerButton = React.createClass({ + displayName: "SelectPlayerButton", + + selectPlayer: function selectPlayer(e) { e.preventDefault(); socket.emit("gather:select", { player: parseInt(e.target.value, 10) - }) + }); }, - render: function () { + render: function render() { if (this.props.gatherer.leader) { - return (React.createElement("button", { - className: "btn btn-xs btn-default", - "data-disabled": "true"}, "Leader")); + return React.createElement( + "button", + { + className: "btn btn-xs btn-default", + "data-disabled": "true" }, + "Leader" + ); } else if (this.props.gatherer.team !== "lobby") { - return (React.createElement("button", { - onClick: this.selectPlayer, - value: this.props.gatherer.id, - className: "btn btn-xs btn-default"}, " Reselect" - ) + return React.createElement( + "button", + { + onClick: this.selectPlayer, + value: this.props.gatherer.id, + className: "btn btn-xs btn-default" }, + " Reselect" ); } else { - return (React.createElement("button", { - onClick: this.selectPlayer, - value: this.props.gatherer.id, - className: "btn btn-xs btn-primary"}, " Select" - ) + return React.createElement( + "button", + { + onClick: this.selectPlayer, + value: this.props.gatherer.id, + className: "btn btn-xs btn-primary" }, + " Select" ); } } }); -var GathererList = React.createClass({displayName: "GathererList", - memberList: function () { +var GathererList = React.createClass({ + displayName: "GathererList", + + memberList: function memberList() { var self = this; return this.props.gather.gatherers.filter(function (gatherer) { return gatherer.team === self.props.team; }).sort(function (gatherer) { - return (gatherer.leader) ? 1 : -1; + return gatherer.leader ? 1 : -1; }); }, - render: function () { - var extractGatherer = function (gatherer) { + render: function render() { + var extractGatherer = function extractGatherer(gatherer) { var image; if (gatherer.leader) { - image = (React.createElement("img", {src: "/images/commander.png", - alt: "Commander", - height: "20", - width: "20"})); + image = React.createElement("img", { src: "/images/commander.png", + alt: "Commander", + height: "20", + width: "20" }); } - return ( - React.createElement("tr", {key: gatherer.id}, - React.createElement("td", {className: "col-md-1"}, image), - React.createElement("td", {className: "col-md-11"}, gatherer.user.username) + return React.createElement( + "tr", + { key: gatherer.id }, + React.createElement( + "td", + { className: "col-md-1" }, + image + ), + React.createElement( + "td", + { className: "col-md-11" }, + gatherer.user.username ) ); - } + }; var members = this.memberList().map(extractGatherer); - return ( - React.createElement("table", {className: "table"}, - React.createElement("tbody", null, - members - ) + return React.createElement( + "table", + { className: "table" }, + React.createElement( + "tbody", + null, + members ) ); } }); -var GatherTeams = React.createClass({displayName: "GatherTeams", - render: function () { - return ( - React.createElement("div", {className: "panel-body"}, - React.createElement("div", {className: "row"}, - React.createElement("div", {className: "col-md-6"}, - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - "Aliens" - ), - React.createElement(GathererList, {gather: this.props.gather, team: "alien"}) - ) - ), - React.createElement("div", {className: "col-md-6"}, - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - "Marines" - ), - React.createElement(GathererList, {gather: this.props.gather, team: "marine"}) - ) +var GatherTeams = React.createClass({ + displayName: "GatherTeams", + + render: function render() { + return React.createElement( + "div", + { className: "panel-body" }, + React.createElement( + "div", + { className: "row" }, + React.createElement( + "div", + { className: "col-md-6" }, + React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + "Aliens" + ), + React.createElement(GathererList, { gather: this.props.gather, team: "alien" }) + ) + ), + React.createElement( + "div", + { className: "col-md-6" }, + React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + "Marines" + ), + React.createElement(GathererList, { gather: this.props.gather, team: "marine" }) ) ) ) @@ -132,55 +176,64 @@ var GatherTeams = React.createClass({displayName: "GatherTeams", } }); -var ElectionProgressBar = React.createClass({displayName: "ElectionProgressBar", - componentDidMount: function () { +var ElectionProgressBar = React.createClass({ + displayName: "ElectionProgressBar", + + componentDidMount: function componentDidMount() { var self = this; this.timer = setInterval(function () { self.forceUpdate(); }, 900); }, - progress: function () { + progress: function progress() { var interval = this.props.gather.election.interval; - var startTime = (new Date(this.props.gather.election.startTime)).getTime(); - var msTranspired = Math.floor((new Date()).getTime() - startTime); + var startTime = new Date(this.props.gather.election.startTime).getTime(); + var msTranspired = Math.floor(new Date().getTime() - startTime); return { num: msTranspired, den: interval, barMessage: Math.floor((interval - msTranspired) / 1000) + "s remaining" - } + }; }, - componentWillUnmount: function () { + componentWillUnmount: function componentWillUnmount() { clearInterval(this.timer); }, - render: function () { - return (React.createElement(ProgressBar, {progress: this.progress()})); + render: function render() { + return React.createElement(ProgressBar, { progress: this.progress() }); } }); -var ProgressBar = React.createClass({displayName: "ProgressBar", - render: function () { +var ProgressBar = React.createClass({ + displayName: "ProgressBar", + + render: function render() { var style = { - width: Math.round((this.props.progress.num / this.props.progress.den * 100)) + "%" + width: Math.round(this.props.progress.num / this.props.progress.den * 100) + "%" }; var barMessage = this.props.progress.barMessage || ""; - return ( - React.createElement("div", {className: "progress"}, - React.createElement("div", {className: "progress-bar progress-bar-striped active", - "data-role": "progressbar", - "data-aria-valuenow": this.props.progress.num, - "data-aria-valuemin": "0", - "data-aria-valuemax": this.props.progress.den, - style: style}, barMessage - ) - ) + return React.createElement( + "div", + { className: "progress" }, + React.createElement( + "div", + { className: "progress-bar progress-bar-striped active", + "data-role": "progressbar", + "data-aria-valuenow": this.props.progress.num, + "data-aria-valuemin": "0", + "data-aria-valuemax": this.props.progress.den, + style: style }, + barMessage + ) ); } }); -var GatherProgress = React.createClass({displayName: "GatherProgress", - stateDescription: function () { - switch(this.props.gather.state) { +var GatherProgress = React.createClass({ + displayName: "GatherProgress", + + stateDescription: function stateDescription() { + switch (this.props.gather.state) { case "gathering": return "Waiting for more gatherers."; case "election": @@ -193,18 +246,18 @@ var GatherProgress = React.createClass({displayName: "GatherProgress", return "Initialising gather."; } }, - gatheringProgress: function () { + gatheringProgress: function gatheringProgress() { var num = this.props.gather.gatherers.length; var den = 12; var remaining = den - num; - var message = (remaining === 1) ? "Waiting for last player" : "Waiting for " + remaining + " more players"; + var message = remaining === 1 ? "Waiting for last player" : "Waiting for " + remaining + " more players"; return { num: num, den: den, message: message }; }, - electionProgress: function () { + electionProgress: function electionProgress() { var num = this.props.gather.gatherers.reduce(function (acc, gatherer) { if (gatherer.leaderVote) acc++; return acc; @@ -216,7 +269,7 @@ var GatherProgress = React.createClass({displayName: "GatherProgress", message: den - num + " more votes required" }; }, - selectionProgress: function () { + selectionProgress: function selectionProgress() { var num = this.props.gather.gatherers.reduce(function (acc, gatherer) { if (gatherer.team !== "lobby") acc++; return acc; @@ -229,115 +282,150 @@ var GatherProgress = React.createClass({displayName: "GatherProgress", message: num + " out of " + den + " players assigned" }; }, - render: function () { + render: function render() { var progress, progressBar; var gatherState = this.props.gather.state; if (gatherState === 'gathering' && this.props.gather.gatherers.length) { progress = this.gatheringProgress(); - progressBar = (React.createElement(ProgressBar, {progress: progress})); + progressBar = React.createElement(ProgressBar, { progress: progress }); } else if (gatherState === 'election') { progress = this.electionProgress(); - progressBar = (React.createElement(ElectionProgressBar, React.__spread({}, this.props, {progress: progress}))); + progressBar = React.createElement(ElectionProgressBar, _extends({}, this.props, { progress: progress })); } else if (gatherState === 'selection') { progress = this.selectionProgress(); - progressBar = (React.createElement(ProgressBar, {progress: progress})); + progressBar = React.createElement(ProgressBar, { progress: progress }); } if (!progress) return false; - return ( - React.createElement("div", {className: "panel-body no-bottom"}, - React.createElement("p", null, React.createElement("strong", null, this.stateDescription()), " ", progress.message), - progressBar - ) + return React.createElement( + "div", + { className: "panel-body no-bottom" }, + React.createElement( + "p", + null, + React.createElement( + "strong", + null, + this.stateDescription() + ), + " ", + progress.message + ), + progressBar ); } }); -var GatherActions = React.createClass({displayName: "GatherActions", - joinGather: function (e) { +var GatherActions = React.createClass({ + displayName: "GatherActions", + + joinGather: function joinGather(e) { e.preventDefault(); socket.emit("gather:join"); }, - leaveGather: function (e) { + leaveGather: function leaveGather(e) { e.preventDefault(); socket.emit("gather:leave"); }, - confirmTeam: function (e) { + confirmTeam: function confirmTeam(e) { e.preventDefault(); socket.emit("gather:select:confirm"); }, - inviteToGather: function (e) { + inviteToGather: function inviteToGather(e) { e.preventDefault(); alert("Boop!"); }, - render: function () { + render: function render() { var joinButton; if (this.props.currentGatherer) { - joinButton = (React.createElement("li", null, React.createElement("button", { - onClick: this.leaveGather, - className: "btn btn-danger"}, "Leave Gather"))); + joinButton = React.createElement( + "li", + null, + React.createElement( + "button", + { + onClick: this.leaveGather, + className: "btn btn-danger" }, + "Leave Gather" + ) + ); } else if (this.props.gather.state === 'gathering') { - joinButton = ( - React.createElement("button", { - onClick: this.joinGather, - className: "btn btn-success"}, "Join Gather") + joinButton = React.createElement( + "button", + { + onClick: this.joinGather, + className: "btn btn-success" }, + "Join Gather" ); } var confirmTeam; - if (this.props.currentGatherer && - this.props.currentGatherer.leader && - this.props.gather.state === 'selection' && - this.props.gather.gatherers.every(function (gatherer) { - return gatherer.team !== 'lobby'; - }) ) { + if (this.props.currentGatherer && this.props.currentGatherer.leader && this.props.gather.state === 'selection' && this.props.gather.gatherers.every(function (gatherer) { + return gatherer.team !== 'lobby'; + })) { if (this.props.currentGatherer.confirm) { - confirmTeam = ( - React.createElement("li", null, - React.createElement("button", { - className: "btn btn-default", + confirmTeam = React.createElement( + "li", + null, + React.createElement( + "button", + { + className: "btn btn-default", "data-disabled": "true" - }, - "Confirmed" - ) + }, + "Confirmed" ) ); } else { - confirmTeam = ( - React.createElement("li", null, - React.createElement("button", { - className: "btn btn-success", - onClick: this.confirmTeam - }, + confirmTeam = React.createElement( + "li", + null, + React.createElement( + "button", + { + className: "btn btn-success", + onClick: this.confirmTeam + }, "Confirm Team" ) - ) ); } } var inviteButton; if (this.props.gather.state === 'gathering') { - inviteButton = (React.createElement("li", null, React.createElement("button", { - onClick: this.inviteToGather, - className: "btn btn-primary"}, "Invite to Gather"))); + inviteButton = React.createElement( + "li", + null, + React.createElement( + "button", + { + onClick: this.inviteToGather, + className: "btn btn-primary" }, + "Invite to Gather" + ) + ); } - return ( - React.createElement("div", {className: "panel-footer text-right"}, - React.createElement("ul", {className: "list-inline no-bottom"}, - confirmTeam, - inviteButton, - joinButton - ) + return React.createElement( + "div", + { className: "panel-footer text-right" }, + React.createElement( + "ul", + { className: "list-inline no-bottom" }, + confirmTeam, + inviteButton, + joinButton ) ); } }); -var ServerVoting = React.createClass({displayName: "ServerVoting", - handleServerVote: function (e) { +var ServerVoting = React.createClass({ + displayName: "ServerVoting", + + handleServerVote: function handleServerVote(e) { e.preventDefault(); socket.emit("gather:vote", { server: { @@ -345,53 +433,72 @@ var ServerVoting = React.createClass({displayName: "ServerVoting", } }); }, - votesForServer: function (server) { + votesForServer: function votesForServer(server) { return this.props.gather.gatherers.reduce(function (acc, gatherer) { if (server.id === gatherer.serverVote) acc++; return acc; }, 0); }, - render: function () { + render: function render() { var self = this; var servers = self.props.servers.map(function (server) { var voteButton; if (self.props.currentGatherer.serverVote === server.id) { - voteButton = (React.createElement("button", { - "data-disabled": "true", - className: "btn btn-xs btn-success"}, - "Voted")) + voteButton = React.createElement( + "button", + { + "data-disabled": "true", + className: "btn btn-xs btn-success" }, + "Voted" + ); } else { - voteButton = (React.createElement("button", { - onClick: self.handleServerVote, - value: server.id, - className: "btn btn-xs btn-primary"}, - "Vote")); + voteButton = React.createElement( + "button", + { + onClick: self.handleServerVote, + value: server.id, + className: "btn btn-xs btn-primary" }, + "Vote" + ); } - return ( - React.createElement("tr", {key: server.id}, - React.createElement("td", {className: "col-md-6"}, server.name), - React.createElement("td", {className: "col-md-6 text-right"}, - self.votesForServer(server), " Votes ", - voteButton - ) + return React.createElement( + "tr", + { key: server.id }, + React.createElement( + "td", + { className: "col-md-6" }, + server.name + ), + React.createElement( + "td", + { className: "col-md-6 text-right" }, + self.votesForServer(server), + " Votes ", + voteButton ) ); }); - return ( - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - "Server Voting" - ), - React.createElement("table", {id: "serverVoteTable", className: "table table-condensed table-hover voting-table"}, - servers - ) + return React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + "Server Voting" + ), + React.createElement( + "table", + { id: "serverVoteTable", className: "table table-condensed table-hover voting-table" }, + servers ) ); } -}) +}); -var MapVoting = React.createClass({displayName: "MapVoting", - handleMapVote: function (e) { +var MapVoting = React.createClass({ + displayName: "MapVoting", + + handleMapVote: function handleMapVote(e) { e.preventDefault(); socket.emit("gather:vote", { map: { @@ -399,82 +506,107 @@ var MapVoting = React.createClass({displayName: "MapVoting", } }); }, - votesForMap: function (map) { + votesForMap: function votesForMap(map) { return this.props.gather.gatherers.reduce(function (acc, gatherer) { if (map.id === gatherer.mapVote) acc++; return acc; }, 0); }, - render: function () { + render: function render() { var self = this; var maps = self.props.maps.map(function (map) { var voteButton; if (self.props.currentGatherer.mapVote === map.id) { - voteButton = (React.createElement("button", { - "data-disabled": "true", - className: "btn btn-xs btn-success"}, - "Voted")) + voteButton = React.createElement( + "button", + { + "data-disabled": "true", + className: "btn btn-xs btn-success" }, + "Voted" + ); } else { - voteButton = (React.createElement("button", { - onClick: self.handleMapVote, - value: map.id, - className: "btn btn-xs btn-primary"}, - "Vote")); + voteButton = React.createElement( + "button", + { + onClick: self.handleMapVote, + value: map.id, + className: "btn btn-xs btn-primary" }, + "Vote" + ); } - return ( - React.createElement("tr", {key: map.id}, - React.createElement("td", {className: "col-md-6"}, map.name), - React.createElement("td", {className: "col-md-6 text-right"}, - self.votesForMap(map), " Votes ", - voteButton - ) + return React.createElement( + "tr", + { key: map.id }, + React.createElement( + "td", + { className: "col-md-6" }, + map.name + ), + React.createElement( + "td", + { className: "col-md-6 text-right" }, + self.votesForMap(map), + " Votes ", + voteButton ) ); }); - return ( - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - "Map Voting" - ), - React.createElement("table", {className: "table table-condensed table-hover voting-table"}, - maps - ) + return React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + "Map Voting" + ), + React.createElement( + "table", + { className: "table table-condensed table-hover voting-table" }, + maps ) ); } -}) +}); -var Gather = React.createClass({displayName: "Gather", - getDefaultProps: function () { +var Gather = React.createClass({ + displayName: "Gather", + + getDefaultProps: function getDefaultProps() { return { gather: { gatherers: [] } - } + }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { var self = this; socket.on("gather:refresh", function (data) { self.setProps(data); }); }, - - render: function () { + + render: function render() { if (this.props.gather.state === 'done') { - return (React.createElement(CompletedGather, React.__spread({}, this.props))); + return React.createElement(CompletedGather, this.props); } var voting; if (this.props.currentGatherer) { - voting = ( - React.createElement("div", {className: "panel-body"}, - React.createElement("div", {className: "row"}, - React.createElement("div", {className: "col-md-6"}, - React.createElement(MapVoting, React.__spread({}, this.props)) - ), - React.createElement("div", {className: "col-md-6"}, - React.createElement(ServerVoting, React.__spread({}, this.props)) - ) + voting = React.createElement( + "div", + { className: "panel-body" }, + React.createElement( + "div", + { className: "row" }, + React.createElement( + "div", + { className: "col-md-6" }, + React.createElement(MapVoting, this.props) + ), + React.createElement( + "div", + { className: "col-md-6" }, + React.createElement(ServerVoting, this.props) ) ) ); @@ -482,53 +614,75 @@ var Gather = React.createClass({displayName: "Gather", var gatherTeams; if (this.props.gather.state === 'selection') { - gatherTeams = React.createElement(GatherTeams, {gather: this.props.gather}) + gatherTeams = React.createElement(GatherTeams, { gather: this.props.gather }); } - return ( - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - React.createElement("strong", null, "Current Gather"), - React.createElement("span", {className: "badge add-left"}, this.props.gather.gatherers.length) - ), - React.createElement(GatherProgress, React.__spread({}, this.props)), - React.createElement(Gatherers, React.__spread({}, this.props)), - gatherTeams, - voting, - React.createElement(GatherActions, React.__spread({}, this.props)) - ) + return React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + React.createElement( + "strong", + null, + "Current Gather" + ), + React.createElement( + "span", + { className: "badge add-left" }, + this.props.gather.gatherers.length + ) + ), + React.createElement(GatherProgress, this.props), + React.createElement(Gatherers, this.props), + gatherTeams, + voting, + React.createElement(GatherActions, this.props) ); } }); -var Gatherers = React.createClass({displayName: "Gatherers", - joinGather: function (e) { +var Gatherers = React.createClass({ + displayName: "Gatherers", + + joinGather: function joinGather(e) { e.preventDefault(); socket.emit("gather:join"); }, - render: function () { + render: function render() { var self = this; var gatherers = this.props.gather.gatherers.map(function (gatherer) { - + // Country var country; if (gatherer.user.country) { - country = (React.createElement("img", {src: "images/blank.gif", - className: "flag flag-" + gatherer.user.country.toLowerCase(), - alt: gatherer.user.country})); + country = React.createElement("img", { src: "images/blank.gif", + className: "flag flag-" + gatherer.user.country.toLowerCase(), + alt: gatherer.user.country }); }; - var division = (React.createElement("span", {className: "label label-primary"}, gatherer.user.ability.division)); - var lifeform = ( - gatherer.user.ability.lifeforms.map(function (lifeform) { - return (React.createElement("span", {className: "label label-default", - key: [lifeform, gatherer.id].join("-")}, lifeform)); - }) + var division = React.createElement( + "span", + { className: "label label-primary" }, + gatherer.user.ability.division ); - var team; + var lifeform = gatherer.user.ability.lifeforms.map(function (lifeform) { + return React.createElement( + "span", + { className: "label label-default", + key: [lifeform, gatherer.id].join("-") }, + lifeform + ); + }); + var team; if (gatherer.user.team) { - team = (React.createElement("span", {className: "label label-primary"}, gatherer.user.team.name)); + team = React.createElement( + "span", + { className: "label label-primary" }, + gatherer.user.team.name + ); } var action; @@ -537,99 +691,199 @@ var Gatherers = React.createClass({displayName: "Gatherers", var votes = self.props.gather.gatherers.reduce(function (acc, voter) { if (voter.leaderVote === gatherer.id) acc++; return acc; - }, 0) - action = ( - React.createElement("span", null, - React.createElement("small", null, votes + " votes", "  "), - React.createElement(VoteButton, {currentGatherer: self.props.currentGatherer, candidate: gatherer}) - ) + }, 0); + action = React.createElement( + "span", + null, + React.createElement( + "small", + null, + votes + " votes", + "  " + ), + React.createElement(VoteButton, { currentGatherer: self.props.currentGatherer, candidate: gatherer }) ); } if (self.props.gather.state === 'selection') { if (self.props.currentGatherer && self.props.currentGatherer.leader) { - action = ( - React.createElement("span", null, - React.createElement(SelectPlayerButton, {gatherer: gatherer}) - ) + action = React.createElement( + "span", + null, + React.createElement(SelectPlayerButton, { gatherer: gatherer }) ); } else { if (gatherer.team !== "lobby") { - action = (React.createElement("span", {className: "label label-success"}, gatherer.team)); + action = React.createElement( + "span", + { className: "label label-success" }, + gatherer.team + ); } } } - return ( - React.createElement("tr", {key: gatherer.user.id}, - React.createElement("td", {className: "col-md-5"}, country, " ", gatherer.user.username, "  (", gatherer.user.id, ")"), - React.createElement("td", {className: "col-md-5"}, - lifeform, " ", division, " ", team, " " - ), - React.createElement("td", {className: "col-md-2 text-right"}, action, " ") + return React.createElement( + "tr", + { key: gatherer.user.id }, + React.createElement( + "td", + { className: "col-md-5" }, + country, + " ", + gatherer.user.username, + "  (", + gatherer.user.id, + ")" + ), + React.createElement( + "td", + { className: "col-md-5" }, + lifeform, + " ", + division, + " ", + team, + " " + ), + React.createElement( + "td", + { className: "col-md-2 text-right" }, + action, + " " ) ); - }) + }); if (this.props.gather.gatherers.length) { - return ( - React.createElement("div", {className: "panel-body"}, - React.createElement("div", {className: "panel panel-default"}, - React.createElement("table", {className: "table roster-table"}, - React.createElement("tbody", null, - gatherers - ) + return React.createElement( + "div", + { className: "panel-body" }, + React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "table", + { className: "table roster-table" }, + React.createElement( + "tbody", + null, + gatherers ) ) ) ); } else { - return ( - React.createElement("div", {className: "panel-body text-center join-hero"}, - React.createElement("button", { - onClick: this.joinGather, - className: "btn btn-success btn-lg"}, "Start a Gather") + return React.createElement( + "div", + { className: "panel-body text-center join-hero" }, + React.createElement( + "button", + { + onClick: this.joinGather, + className: "btn btn-success btn-lg" }, + "Start a Gather" ) ); } } }); -var CompletedGather = React.createClass({displayName: "CompletedGather", - countVotes: function (voteType) { +var CompletedGather = React.createClass({ + displayName: "CompletedGather", + + countVotes: function countVotes(voteType) { return this.props.gather.gatherers.reduce(function (acc, gatherer) { if (gatherer[voteType] !== null) acc.push(gatherer[voteType]); return acc; }, []); }, - selectedMaps: function () { - return rankVotes(this.countVotes('mapVote'), this.props.maps).slice(0, 2) + selectedMaps: function selectedMaps() { + return rankVotes(this.countVotes('mapVote'), this.props.maps).slice(0, 2); }, - selectedServer: function () { + selectedServer: function selectedServer() { return rankVotes(this.countVotes('serverVote'), this.props.servers).slice(0, 1); }, - render: function () { + render: function render() { var maps = this.selectedMaps(); var server = this.selectedServer().pop(); - return ( - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, - React.createElement("strong", null, "Gather Details") - ), - React.createElement(GatherTeams, {gather: this.props.gather}), - React.createElement("div", {className: "panel-body"}, - React.createElement("dl", {className: "dl-horizontal"}, - React.createElement("dt", null, "Maps"), - React.createElement("dd", null, maps.map(function(map) { return map.name}).join(" & ")), - React.createElement("dt", null, "Server"), - React.createElement("dd", null, server.name), - React.createElement("dt", null, "Address"), - React.createElement("dd", null, server.ip, ":", server.port), - React.createElement("dt", null, "Password"), - React.createElement("dd", null, server.password), - React.createElement("br", null), - React.createElement("dt", null, " "), - React.createElement("dd", null, React.createElement("a", {href: ["steam://run/4920/connect", server.ip +":"+server.port, server.password].join("/"), - className: "btn btn-primary"}, "Click to Join")) + return React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + React.createElement( + "strong", + null, + "Gather Details" + ) + ), + React.createElement(GatherTeams, { gather: this.props.gather }), + React.createElement( + "div", + { className: "panel-body" }, + React.createElement( + "dl", + { className: "dl-horizontal" }, + React.createElement( + "dt", + null, + "Maps" + ), + React.createElement( + "dd", + null, + maps.map(function (map) { + return map.name; + }).join(" & ") + ), + React.createElement( + "dt", + null, + "Server" + ), + React.createElement( + "dd", + null, + server.name + ), + React.createElement( + "dt", + null, + "Address" + ), + React.createElement( + "dd", + null, + server.ip, + ":", + server.port + ), + React.createElement( + "dt", + null, + "Password" + ), + React.createElement( + "dd", + null, + server.password + ), + React.createElement("br", null), + React.createElement( + "dt", + null, + " " + ), + React.createElement( + "dd", + null, + React.createElement( + "a", + { href: ["steam://run/4920/connect", server.ip + ":" + server.port, server.password].join("/"), + className: "btn btn-primary" }, + "Click to Join" + ) ) ) ) @@ -641,20 +895,21 @@ var CompletedGather = React.createClass({displayName: "CompletedGather", var socket; -function initialiseVisibilityMonitoring (socket) { - var hidden, visibilityChange; - if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support - hidden = "hidden"; - visibilityChange = "visibilitychange"; +function initialiseVisibilityMonitoring(socket) { + var hidden, visibilityChange; + if (typeof document.hidden !== "undefined") { + // Opera 12.10 and Firefox 18 and later support + hidden = "hidden"; + visibilityChange = "visibilitychange"; } else if (typeof document.mozHidden !== "undefined") { - hidden = "mozHidden"; - visibilityChange = "mozvisibilitychange"; + hidden = "mozHidden"; + visibilityChange = "mozvisibilitychange"; } else if (typeof document.msHidden !== "undefined") { - hidden = "msHidden"; - visibilityChange = "msvisibilitychange"; + hidden = "msHidden"; + visibilityChange = "msvisibilitychange"; } else if (typeof document.webkitHidden !== "undefined") { - hidden = "webkitHidden"; - visibilityChange = "webkitvisibilitychange"; + hidden = "webkitHidden"; + visibilityChange = "webkitvisibilitychange"; } document.addEventListener(visibilityChange, function () { @@ -666,18 +921,15 @@ function initialiseVisibilityMonitoring (socket) { }, false); } -function initialiseComponents () { +function initialiseComponents() { var socketUrl = window.location.protocol + "//" + window.location.host; - socket = io(socketUrl) - .on("connect", function () { - console.log("Connected"); - }) - .on("reconnect", function () { - console.log("Reconnected"); - }) - .on("disconnect", function () { - console.log("Disconnected") - }); + socket = io(socketUrl).on("connect", function () { + console.log("Connected"); + }).on("reconnect", function () { + console.log("Reconnected"); + }).on("disconnect", function () { + console.log("Disconnected"); + }); initialiseVisibilityMonitoring(socket); @@ -691,13 +943,15 @@ function initialiseComponents () { "use strict"; -var Chatroom = React.createClass({displayName: "Chatroom", - getDefaultProps: function () { +var Chatroom = React.createClass({ + displayName: "Chatroom", + + getDefaultProps: function getDefaultProps() { return { history: [] }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { var self = this; var TIMER_INTERVAL = 5000; // Every minute @@ -725,35 +979,43 @@ var Chatroom = React.createClass({displayName: "Chatroom", }, TIMER_INTERVAL); }, - componentDidUnmount: function () { + componentDidUnmount: function componentDidUnmount() { clearInterval(this.timer); }, - sendMessage: function (message) { - socket.emit("newMessage", {message: message}); + sendMessage: function sendMessage(message) { + socket.emit("newMessage", { message: message }); }, - scrollToBottom: function () { + scrollToBottom: function scrollToBottom() { var node = React.findDOMNode(this.refs.messageContainer); - node.scrollTop = node.scrollHeight; + node.scrollTop = node.scrollHeight; }, - render: function () { + render: function render() { var messages = this.props.history.map(function (message) { - return ( - React.createElement(ChatMessage, { - message: message, - key: message.id}) - ); + return React.createElement(ChatMessage, { + message: message, + key: message.id }); }); - return ( - React.createElement("div", {className: "panel panel-default"}, - React.createElement("div", {className: "panel-heading"}, "Gather Chat"), - React.createElement("div", {className: "panel-body"}, - React.createElement("ul", {className: "chat", id: "chatmessages", ref: "messageContainer"}, - messages - ) - ), - React.createElement("div", {className: "panel-footer"}, - React.createElement(MessageBar, null) + return React.createElement( + "div", + { className: "panel panel-default" }, + React.createElement( + "div", + { className: "panel-heading" }, + "Gather Chat" + ), + React.createElement( + "div", + { className: "panel-body" }, + React.createElement( + "ul", + { className: "chat", id: "chatmessages", ref: "messageContainer" }, + messages ) + ), + React.createElement( + "div", + { className: "panel-footer" }, + React.createElement(MessageBar, null) ) ); } @@ -767,45 +1029,67 @@ var timer = setInterval(function () { }); }, 60000); -var ChatMessage = React.createClass({displayName: "ChatMessage", - componentDidMount: function () { +var ChatMessage = React.createClass({ + displayName: "ChatMessage", + + componentDidMount: function componentDidMount() { var self = this; updateMessageCallbacks.push(function () { self.forceUpdate(); }); }, - render: function () { - return ( - React.createElement("li", {className: "left clearfix"}, - React.createElement("span", {className: "chat-img pull-left"}, - React.createElement("img", { - src: this.props.message.author.avatar, - alt: "User Avatar", - height: "40", - width: "40", - className: "img-circle"}) - ), - React.createElement("div", {className: "chat-body clearfix"}, - React.createElement("div", {className: "header"}, - React.createElement("strong", {className: "primary-font"}, this.props.message.author.username), - React.createElement("small", {className: "pull-right text-muted"}, - React.createElement("i", {className: "fa fa-clock-o fa-fw"}), " ", $.timeago(this.props.message.createdAt) - ) - ), - React.createElement("p", null, this.props.message.content) + render: function render() { + return React.createElement( + "li", + { className: "left clearfix" }, + React.createElement( + "span", + { className: "chat-img pull-left" }, + React.createElement("img", { + src: this.props.message.author.avatar, + alt: "User Avatar", + height: "40", + width: "40", + className: "img-circle" }) + ), + React.createElement( + "div", + { className: "chat-body clearfix" }, + React.createElement( + "div", + { className: "header" }, + React.createElement( + "strong", + { className: "primary-font" }, + this.props.message.author.username + ), + React.createElement( + "small", + { className: "pull-right text-muted" }, + React.createElement("i", { className: "fa fa-clock-o fa-fw" }), + " ", + $.timeago(this.props.message.createdAt) + ) + ), + React.createElement( + "p", + null, + this.props.message.content ) ) ); } }); -var MessageBar = React.createClass({displayName: "MessageBar", - sendMessage: function (content) { +var MessageBar = React.createClass({ + displayName: "MessageBar", + + sendMessage: function sendMessage(content) { socket.emit("message:new", { content: content }); }, - handleSubmit: function (e) { + handleSubmit: function handleSubmit(e) { e.preventDefault(); var content = React.findDOMNode(this.refs.content).value.trim(); if (!content) return; @@ -813,23 +1097,27 @@ var MessageBar = React.createClass({displayName: "MessageBar", this.sendMessage(content); return; }, - render: function () { - return ( - React.createElement("form", {onSubmit: this.handleSubmit}, - React.createElement("div", {className: "input-group"}, + render: function render() { + return React.createElement( + "form", + { onSubmit: this.handleSubmit }, + React.createElement( + "div", + { className: "input-group" }, + React.createElement("input", { + id: "btn-input", + type: "text", + className: "form-control", + ref: "content", + placeholder: "Be polite please..." }), + React.createElement( + "span", + { className: "input-group-btn" }, React.createElement("input", { - id: "btn-input", - type: "text", - className: "form-control", - ref: "content", - placeholder: "Be polite please..."}), - React.createElement("span", {className: "input-group-btn"}, - React.createElement("input", { - type: "submit", - className: "btn btn-primary", - id: "btn-chat", - value: "Send"}) - ) + type: "submit", + className: "btn btn-primary", + id: "btn-chat", + value: "Send" }) ) ) ); @@ -838,8 +1126,10 @@ var MessageBar = React.createClass({displayName: "MessageBar", "use strict"; -var UserLogin = React.createClass({displayName: "UserLogin", - authorizeId: function (id) { +var UserLogin = React.createClass({ + displayName: "UserLogin", + + authorizeId: function authorizeId(id) { socket.emit("users:authorize", { id: parseInt(id, 10) }); @@ -847,46 +1137,62 @@ var UserLogin = React.createClass({displayName: "UserLogin", socket.emit("gather:refresh"); }, 1000); }, - handleSubmit: function (e) { + handleSubmit: function handleSubmit(e) { e.preventDefault(); var id = React.findDOMNode(this.refs.authorize_id).value.trim(); if (!id) return; React.findDOMNode(this.refs.authorize_id).value = ''; this.authorizeId(id); }, - render: function () { - return ( - React.createElement("form", {onSubmit: this.handleSubmit}, - React.createElement("div", {className: "input-group signin"}, + render: function render() { + return React.createElement( + "form", + { onSubmit: this.handleSubmit }, + React.createElement( + "div", + { className: "input-group signin" }, + React.createElement("input", { + id: "btn-input", + type: "text", + className: "form-control", + ref: "authorize_id", + placeholder: "Choose an ID..." }), + React.createElement( + "span", + { className: "input-group-btn" }, React.createElement("input", { - id: "btn-input", - type: "text", - className: "form-control", - ref: "authorize_id", - placeholder: "Choose an ID..."}), - React.createElement("span", {className: "input-group-btn"}, - React.createElement("input", { - type: "submit", - className: "btn btn-primary", - id: "btn-chat", - value: "Login"}) + type: "submit", + className: "btn btn-primary", + id: "btn-chat", + value: "Login" }) + ) + ), + React.createElement( + "div", + { className: "signin" }, + React.createElement( + "p", + { className: "text-center" }, + React.createElement( + "small", + null, + "Just a temporary measure until genuine authentication is implemented" ) - ), - React.createElement("div", {className: "signin"}, - React.createElement("p", {className: "text-center"}, React.createElement("small", null, "Just a temporary measure until genuine authentication is implemented")) ) ) ); } -}) +}); -var UserMenu = React.createClass({displayName: "UserMenu", - getDefaultProps: function () { +var UserMenu = React.createClass({ + displayName: "UserMenu", + + getDefaultProps: function getDefaultProps() { return { users: [] }; }, - componentDidMount: function () { + componentDidMount: function componentDidMount() { var self = this; socket.on('users:update', function (data) { self.setProps({ @@ -894,51 +1200,97 @@ var UserMenu = React.createClass({displayName: "UserMenu", }); }); }, - render: function () { + render: function render() { var users = this.props.users.map(function (user) { - return ( - React.createElement("li", {key: user.id}, React.createElement("a", {href: "#"}, user.username)) + return React.createElement( + "li", + { key: user.id }, + React.createElement( + "a", + { href: "#" }, + user.username + ) ); }); - return ( - React.createElement("ul", {className: "nav", id: "side-menu"}, - React.createElement("li", null, - React.createElement("a", {href: "#"}, - React.createElement("i", {className: "fa fa-users fa-fw"}), " Online", - React.createElement("span", {className: "badge add-left"}, " ", this.props.users.length, " ") + return React.createElement( + "ul", + { className: "nav", id: "side-menu" }, + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "#" }, + React.createElement("i", { className: "fa fa-users fa-fw" }), + " Online", + React.createElement( + "span", + { className: "badge add-left" }, + " ", + this.props.users.length, + " " ) - ), - users, - React.createElement("li", null, React.createElement("br", null), React.createElement(UserLogin, null), React.createElement("br", null)) + ) + ), + users, + React.createElement( + "li", + null, + React.createElement("br", null), + React.createElement(UserLogin, null), + React.createElement("br", null) ) ); } }); -var AdminPanel = React.createClass({displayName: "AdminPanel", - handleGatherReset: function () { +var AdminPanel = React.createClass({ + displayName: "AdminPanel", + + handleGatherReset: function handleGatherReset() { socket.emit("gather:reset"); }, - render: function () { - return ( - React.createElement("ul", {className: "nav", id: "admin-menu"}, - React.createElement("li", null, - React.createElement("div", {className: "admin-panel"}, - React.createElement("h5", null, "Admin"), - React.createElement("button", { - className: "btn btn-danger max-width", - onClick: this.handleGatherReset}, - "Reset Gather"), - React.createElement("p", {className: "text-center add-top"}, React.createElement("small", null, "Only responds for admins on staging.ensl.org")) + render: function render() { + return React.createElement( + "ul", + { className: "nav", id: "admin-menu" }, + React.createElement( + "li", + null, + React.createElement( + "div", + { className: "admin-panel" }, + React.createElement( + "h5", + null, + "Admin" + ), + React.createElement( + "button", + { + className: "btn btn-danger max-width", + onClick: this.handleGatherReset }, + "Reset Gather" + ), + React.createElement( + "p", + { className: "text-center add-top" }, + React.createElement( + "small", + null, + "Only responds for admins on staging.ensl.org" + ) ) ) ) - ) + ); } }); -var CurrentUser = React.createClass({displayName: "CurrentUser", - componentDidMount: function () { +var CurrentUser = React.createClass({ + displayName: "CurrentUser", + + componentDidMount: function componentDidMount() { var self = this; socket.on("users:update", function (data) { self.setProps({ @@ -947,38 +1299,80 @@ var CurrentUser = React.createClass({displayName: "CurrentUser", }); socket.emit("users:refresh"); }, - render: function () { + render: function render() { if (this.props.user) { - return ( - React.createElement("li", {className: "dropdown"}, - React.createElement("a", {className: "dropdown-toggle", "data-toggle": "dropdown", href: "#"}, - this.props.user.username, "  ", React.createElement("img", {src: this.props.user.avatar, - alt: "User Avatar", - height: "20", - width: "20"}), " ", React.createElement("i", {className: "fa fa-caret-down"}) - ), - React.createElement("ul", {className: "dropdown-menu dropdown-user"}, - React.createElement("li", null, - React.createElement("a", {href: "#"}, React.createElement("i", {className: "fa fa-gear fa-fw"}), " Profile") - ), - React.createElement("li", null, - React.createElement("a", {href: "#"}, React.createElement("i", {className: "fa fa-flag fa-fw"}), " Notifications") - ), - React.createElement("li", null, - React.createElement("a", {href: "#"}, React.createElement("i", {className: "fa fa-music fa-fw"}), " Sounds") - ), - React.createElement("li", null, - React.createElement("a", {href: "#", "data-toggle": "modal", "data-target": "#designmodal"}, "Design Goals") - ), - React.createElement("li", {className: "divider"}), - React.createElement("li", null, React.createElement("a", {href: "login.html"}, React.createElement("i", {className: "fa fa-sign-out fa-fw"}), " Logout") + return React.createElement( + "li", + { className: "dropdown" }, + React.createElement( + "a", + { className: "dropdown-toggle", "data-toggle": "dropdown", href: "#" }, + this.props.user.username, + "  ", + React.createElement("img", { src: this.props.user.avatar, + alt: "User Avatar", + height: "20", + width: "20" }), + " ", + React.createElement("i", { className: "fa fa-caret-down" }) + ), + React.createElement( + "ul", + { className: "dropdown-menu dropdown-user" }, + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "#" }, + React.createElement("i", { className: "fa fa-gear fa-fw" }), + " Profile" + ) + ), + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "#" }, + React.createElement("i", { className: "fa fa-flag fa-fw" }), + " Notifications" + ) + ), + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "#" }, + React.createElement("i", { className: "fa fa-music fa-fw" }), + " Sounds" + ) + ), + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "#", "data-toggle": "modal", "data-target": "#designmodal" }, + "Design Goals" + ) + ), + React.createElement("li", { className: "divider" }), + React.createElement( + "li", + null, + React.createElement( + "a", + { href: "login.html" }, + React.createElement("i", { className: "fa fa-sign-out fa-fw" }), + " Logout" ) ) ) - ); } else { return false; } } -}); +}); \ No newline at end of file