Skip to content

Commit

Permalink
Ready for production build
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsaini committed Mar 14, 2018
1 parent dfef42a commit bf3df66
Show file tree
Hide file tree
Showing 11 changed files with 852 additions and 1,386 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
Thumbs.db
*.log
dist
release-builds
/dist
/temp

Expand Down
Binary file added app/7e3d2a92473b14dea460b9b87b4639bf.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion app/js/commentary.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var events = ["foul","goal","miss","yellow","pass","cross","tackle","shoot","thr
var goalEmotions = ["IT IS IN!","GOALLLL!!!","WHAT A STRIKE!","AMAZING GOAL!","OFF THE FAR POST AND IN TO THE NET!","FOUND THE BACK OF THE NET"]; //6
var matchEvents = ["PENALTY AWARDED!","CORNER KICK AWARDED","FREE KICK","A chance to score"];
var goalDescriptions = ["Chips over the goalkeeper","Shoots from 30 yards out","Collects the ball and tucks in beautifully","Dribbles past the defenders and shoots","Had a one on one with GK"]; //5
var goalMiss = ["Oooo! The ball goes wide","What a save by the goal-keeper","Defender comes in between and blocks the shot","Blocked by the goalie","Offside"]; //5
var goalMiss = ["Oooo! The ball goes wide","What a save by the goal-keeper","Defender comes in between and blocks the shot","Blocked by the goalie","but caught Offside"]; //5
var fillers = ["keeps the possession","are playing an attacking game","are trying to create a chance","wins the possesion","\'s attackingkiller move","in defence mode"]; //5
var foulPlay = ["Foul play by","Dirty tackle by","Looks like a foul by","Ooo! Bad tackle by"] //4

Expand Down
11 changes: 9 additions & 2 deletions app/js/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function sendChat(msg) {
channel : "chat",
message : {"available":available,"sender":store.get('team_id'),"name":store.get('name'),"chat":msg,"msg":""}
}

pubnub.publish(publishConfig, function(status, response) {
console.log(status, response);
})
Expand Down Expand Up @@ -191,7 +191,10 @@ function trySubscribe() {
});
}

var timeOut = null;

function connectToUser(id,name) {
timeOut = setTimeout(endMatchConnection, 10000);
$("#user_list").hide();
$(".sk-folding-cube").show();

Expand All @@ -213,8 +216,12 @@ function connectToUser(id,name) {
}
}



function startMatchSetup(mc,name) {
//send a msg to tell you are unavailable to others
clearTimeout(timeOut);
timeOut = null;
publishAvailableMessage();
$(".sk-folding-cube").show();
/*
Expand Down Expand Up @@ -254,7 +261,7 @@ function startMatchSetup(mc,name) {
function endMatchConnection() {
//clear the defaults
$("#user_list").show();
$(".sk-folding-cube").hide();
//$(".sk-folding-cube").hide();
requestCame = false;
available = "yes";
versus = "";
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = env => {
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' }
},{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'file-loader?limit=100000' }
], loaders: [
// Pass *.jsx files through jsx-loader transform
{ test: /\.js$/, loaders: ['react-hot','jsx?harmony'] },
Expand Down
2 changes: 1 addition & 1 deletion config/env_development.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "development",
"name": "production",
"description": "Add here any environment specific stuff you like."
}
2 changes: 1 addition & 1 deletion config/env_production.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "production",
"name": "development",
"description": "Add here any environment specific stuff you like."
}
2,207 changes: 834 additions & 1,373 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@
"node_modules/**/*",
"package.json"
],
"win": {
"target": "nsis",
"icon": "resources/icon.ico"
},
"directories": {
"buildResources": "resources"
},
"publish": null
"publish": true
},
"scripts": {
"postinstall": "electron-builder install-app-deps",
Expand All @@ -34,6 +30,7 @@
"start": "node build/start.js",
"dist": "build",
"release": "npm test && webpack --config=build/webpack.app.config.js --env=production && electron-builder"

},
"dependencies": {
"confetti-js": "0.0.11",
Expand Down
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ document.querySelector("#playground").innerHTML = playground();
document.querySelector("#field_area").innerHTML = field();

//add chat to sidebar
var chatDom = "<div id='chat_area'></div><input id='chat_input' style='font-size:20px;' placeholder='Send message...'/>";
var chatDom = "<div id='chat_area'></div><input id='chat_input' style='font-size:20px;' placeholder='Chat with players...'/>";
$("#sidebar").append(chatDom);

//------Click Listeners & state maintainers-------
Expand Down
2 changes: 1 addition & 1 deletion src/start/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var opp_name = currMatch.get('opp_name');
var venue = currMatch.get('self_venue');
console.log(store);

var loginDom = '<div id="profile_area"><input id="name_input" placeholder="Your Team\'s Name"/><button id="login_btn" onClick="saveName()">Save Profile</button></div>';
var loginDom = '<div id="profile_area"><input id="name_input" placeholder="Your Team\'s Name"/><button id="login_btn" onClick="saveName()">Create Team</button></div>';

var userScore = '<div id="profile_score_area"> W: '+store.get('wins')+' L: '+store.get('losses')+' D: '+store.get('draws')+' </div>';

Expand Down

0 comments on commit bf3df66

Please sign in to comment.