Skip to content

Commit

Permalink
dependencies update, small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyagru committed Oct 29, 2017
1 parent 594c205 commit a7d1116
Show file tree
Hide file tree
Showing 13 changed files with 11,913 additions and 68 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
app/dist/index.html
app/dist/main.js
app/dist/renderer.js
app/dist/styles.css
builds/*
coverage
node_modules/
npm-debug.log
npm-debug.log.*
thumbs.db
!.gitkeep
1 change: 1 addition & 0 deletions app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>Space Snake</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,700">
<% if (htmlWebpackPlugin.options.appModules) { %>
<!-- Add `app/node_modules` to global paths so `require` works properly in development -->
<script>
Expand Down
173 changes: 173 additions & 0 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "space-snake",
"version": "0.9.2",
"version": "0.10.0",
"description": "A Desktop game built with Electron-vue template.",
"main": "./dist/main.js",
"dependencies": {
"vue": "^2.1.10",
"vue": "^2.5.2",
"vue-electron": "^1.0.6",
"vue-resource": "^1.0.3",
"vue-router": "^2.1.2",
"vuex": "^2.1.1"
"vue-resource": "^1.3.4",
"vue-router": "^2.8.1",
"vuex": "^2.5.0"
},
"devDependencies": {},
"author": "Ilya Gruzhevski <>"
"author": "Ilya Gruzhevski"
}
4 changes: 2 additions & 2 deletions app/src/main/index.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ require('electron').app.on('ready', () => {
installExtension.default(installExtension.VUEJS_DEVTOOLS)
.then(() => {})
.catch(err => {
console.log('Unable to install `vue-devtools`: \n', err);
});
console.log('Unable to install `vue-devtools`: \n', err);
});
});

// Require `main` process to boot app
Expand Down
2 changes: 2 additions & 0 deletions app/src/renderer/components/Game/Game.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
</script>

<style lang="scss">
@import '../../styles/style';
.game {
position: relative;
Expand Down
2 changes: 2 additions & 0 deletions app/src/renderer/components/Leaderboard/Leaderboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
</script>

<style scoped lang="scss">
@import '../../styles/style';
.leaderboard {
overflow: scroll;
max-height: 550px;
Expand Down
2 changes: 2 additions & 0 deletions app/src/renderer/components/Topbar/Topbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
</script>

<style scoped lang="scss">
@import '../../styles/style';
#topbar {
background-color: #fff;
padding: 20px;
Expand Down
10 changes: 4 additions & 6 deletions app/src/renderer/styles/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@import url(https://fonts.googleapis.com/css?family=Lato:300,700);

@import './variables';
@import './mixins';
@import './helpers';
@import './milligram';
@import 'variables';
@import 'mixins';
@import 'helpers';
@import 'milligram';
10 changes: 7 additions & 3 deletions app/src/renderer/vuex/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ export default {
},

getScores() {
let scores = [];
const scores = [];

for (let key in storage) {
scores.push(JSON.parse(storage.getItem(key)));
try {
for (let key in storage) {
scores.push(JSON.parse(storage.getItem(key)));
}
} catch (error) {
console.warn('Probably localStorage has not only score objects. Delete non-JSON records in the localStorage to remove this warning.');
}

return scores;
Expand Down
Loading

0 comments on commit a7d1116

Please sign in to comment.