This commit is contained in:
Chris Blanchard 2016-01-22 21:39:03 +00:00
parent 5f958ed02e
commit 1720f0a513
23 changed files with 48968 additions and 52863 deletions

View file

@ -1,3 +1,5 @@
const ReactDOM = require("react-dom");
const App = require("javascripts/components/main");
const App = require("components/main");
module.exports = mount => { ReactDOM.render(App, mount) };

View file

@ -1,3 +1,4 @@
const $ = require("jquery");
const React = require("react");
const Events = React.createClass({
@ -26,3 +27,5 @@ const Events = React.createClass({
);
}
});
module.exports = Events;

View file

@ -1,4 +1,8 @@
const React = require("react");
const helper = require("javascripts/helper");
const enslUrl = helper.enslUrl;
const rankVotes = helper.rankeVotes;
const hiveUrl = helper.hiveUrl;
var SelectPlayerButton = React.createClass({
selectPlayer(e) {

View file

@ -6,7 +6,8 @@ const Message = require("javascripts/components/message");
const Settings = require("javascripts/components/settings");
const Sound = require("javascripts/components/sound");
const User = require("javascripts/components/user");
const helper = require("javascripts/helper");
const storageAvailable = helper.storageAvailable;
const SplashScreen = React.createClass({
getInitialState() {

View file

@ -1,5 +1,6 @@
const React = require("react");
const ReactEmoji = require("react-emoji");
const ReactAutolink = require("ReactAutolink");
const MessageBrowser = React.createClass({
getInitialState() {
return {

View file

@ -1,4 +1,7 @@
const Howl = require("j=howl");
const Howl = require("howl");
const React = require("react");
const helper = require("javascripts/helper");
const storageAvailable = helper.storageAvailable;
class SoundController {
constructor () {

View file

@ -1,4 +1,8 @@
const React = require("react");
const helper = require("javascripts/helper");
const enslUrl = helper.enslUrl;
const hiveUrl = helper.hiveUrl;
const modalId = helper.modalId;
const UserLogin = React.createClass({
authorizeId(id) {

View file

@ -4,7 +4,7 @@
// 2. Increments ID vote tally for every vote
// 3. Sorts
var rankVotes = function (votes, candidates) {
const rankVotes = exports.rankVotes = function (votes, candidates) {
var initial = candidates.reduce(function (acc, candidate) {
acc[candidate.id] = 0;
return acc;
@ -44,24 +44,24 @@ var rankVotes = function (votes, candidates) {
});
};
var enslUrl = (gatherer) => {
const enslUrl = exports.enslUrl = (gatherer) => {
return `http://www.ensl.org/users/${gatherer.id}`
};
var hiveUrl = (gatherer) => {
let hiveId = gatherer.user.hive.id;
const hiveUrl = exports.hiveUrl = (gatherer) => {
const hiveId = gatherer.user.hive.id;
if (hiveId) {
return `http://hive.naturalselection2.com/profile/${hiveId}`
return `http://hive.naturalselection2.com/profile/${hiveId}`;
} else {
return null;
}
};
var modalId = (user) => {
return `user-modal-${user.id}`
const modalId = exports.modalId = (user) => {
return `user-modal-${user.id}`;
};
function storageAvailable(type) {
const storageAvailable = exports.storageAvailable = (type) => {
try {
var storage = window[type],
x = '__storage_test__';
@ -72,4 +72,4 @@ function storageAvailable(type) {
catch(e) {
return false;
}
}
};

File diff suppressed because it is too large Load diff

View file

@ -3,12 +3,14 @@ exports.config = {
files: {
javascripts: {
joinTo: {
'app.js': /^(app|node_modules)/,
'vendor.js': /^vendor/
"app.js": /^(app)/,
"vendor.js": /^(vendor|node_modules)/
}
},
stylesheets: {
joinTo: "app.css"
joinTo: {
"app.css": /^(app|vendor|node_modules)/
}
},
templates: {
joinTo: "app.js"
@ -44,10 +46,15 @@ exports.config = {
// 'app.js': ['app']
// }
// },
npm: {
enabled: true,
whitelist: ["react", "react-dom", "jquery", "lodash"],
styles: {
"bootstrap": ["dist/css/bootstrap.min.css"]
},
whitelist: ["react", "react-dom", "jquery", "lodash",
"react-autolink-text", "react-dom", "react-emoji",
"bootstrap", "bootstrap-slider"],
globals: {
"_": "lodash",
"jQuery": "jquery",

View file

@ -34,6 +34,8 @@
"babel-brunch": "~6.0.0",
"babel-preset-es2015": "~6.3.13",
"babel-preset-react": "~6.3.13",
"bootstrap": "~3.3.6",
"bootstrap-slider": "^6.0.7",
"brunch": "~2.1.3",
"clean-css-brunch": ">= 1.0 < 1.8",
"cookie-parser": "~1.3.5",
@ -50,7 +52,9 @@
"morgan": "~1.6.1",
"newrelic": "~1.22.1",
"react": "~0.14.6",
"react-autolink-text": "joshparolin/react-autolink-text",
"react-dom": "~0.14.6",
"react-emoji": "~0.4.1",
"request": "~2.60.0",
"serve-favicon": "~2.3.0",
"socket.io": "~1.3.7",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactAutolink=e(require("react")):t.ReactAutolink=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t["default"]:t},o=n(r(2)),u=n(r(1)),a=function(){var t=/((?:https?:\/\/)?(?:(?:[a-z0-9]?(?:[a-z0-9\-]{1,61}[a-z0-9])?\.[^\.|\s])+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?\-\\(\\)]*)/gi,e=function(t,e){return t.slice(0,e.length)===e};return{autolink:function(r){var n=void 0===arguments[1]?{}:arguments[1];return r?r.split(t).map(function(r){var a=r.match(t);if(a){var i=a[0],c=i.split("/");return""!==c[1]&&c[0].length<5?r:o.createElement("a",u({href:e(i,"http")?i:"http://"+i},n),i)}return r}):[]}}};t.exports=a()},function(t,e,r){"use strict";function n(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t,e){for(var r,o,u=n(t),a=1;a<arguments.length;a++){r=arguments[a],o=Object.keys(Object(r));for(var i=0;i<o.length;i++)u[o[i]]=r[o[i]]}return u}},function(e,r,n){e.exports=t}])});

File diff suppressed because one or more lines are too long

1
vendor/emoji.min.js vendored

File diff suppressed because one or more lines are too long

29
vendor/slider.min.js vendored

File diff suppressed because one or more lines are too long