Skip to content

Commit

Permalink
small changes to prep and add build-all
Browse files Browse the repository at this point in the history
  • Loading branch information
neelr committed Oct 7, 2019
1 parent e74a2d3 commit f8ce521
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ out
package-log.json
the-debate-timer*
.DS_Store
mac
linux
win
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function createWindow () {
minWidth:300,
webPreferences: {
nodeIntegration: true
},
icon: path.join(__dirname, '/assets/app.png')
}
})
if (process.env.NODE_ENV !== "dev") {
win.loadURL(url.format({
Expand Down
Binary file removed assets/Icon.icns/AppIcon.png_1024x1024x32.png
Binary file not shown.
Binary file removed assets/Icon.icns/AppIcon.png_128x128x32.png
Binary file not shown.
Binary file removed assets/Icon.icns/AppIcon.png_16x16x32.png
Binary file not shown.
Binary file removed assets/Icon.icns/AppIcon.png_32x32x32.png
Binary file not shown.
Binary file removed assets/Icon.icns/AppIcon.png_512x512x32.png
Binary file not shown.
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@
"start": "electron .",
"start-next": "next",
"build": "next build && next export",
"package":"electron-packager ."
"package":"electron-packager .",
"build-all":"electron-packager . --overwrite --platform=win32 --arch=ia32 --version-string.ProductName=\"the debate timer\" --out=win && electron-packager . --overwrite --asar=true --platform=linux --arch=x64 --out=linux && electron-packager . --overwrite --platform=darwin --arch=x64 --prune=true --out=mac"
},
"build": {
"extraResources": ["./extraResources/**"]
"mac": {
"icon": "./assets/AppIcon.icns",
"category": "public.app-category.utilities"
},
"win": {
"icon": "./assets/app.png"
},
"files": [
"./assets/*"
],
"directories": {
"buildResources": "assets"
},
"author": "",
"license": "MIT",
Expand Down
15 changes: 15 additions & 0 deletions pages/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export default class Index extends React.Component {
}
Array.prototype.map.call(document.getElementsByClassName("eight"),(element)=> {
element.onclick = ()=> {
if (prep == 1) {
affPrep = time;
} else if (prep == 2) {
negPrep = time;
}
prep = 0;
on = false;
clearInterval(interval);
Expand All @@ -81,6 +86,11 @@ export default class Index extends React.Component {
});
Array.prototype.map.call(document.getElementsByClassName("five"),(element)=> {
element.onclick = ()=> {
if (prep == 1) {
affPrep = time;
} else if (prep == 2) {
negPrep = time;
}
prep = 0;
on = false;
clearInterval(interval);
Expand All @@ -96,6 +106,11 @@ export default class Index extends React.Component {
});
Array.prototype.map.call(document.getElementsByClassName("three"),(element)=> {
element.onclick = ()=> {
if (prep == 1) {
affPrep = time;
} else if (prep == 2) {
negPrep = time;
}
prep = 0;
on = false;
clearInterval(interval);
Expand Down

0 comments on commit f8ce521

Please sign in to comment.