Skip to content

Commit

Permalink
package app for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
hardchor committed May 26, 2016
1 parent d9bb226 commit 81150a8
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 147 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "timesheets",
"name": "Timesheets",
"version": "0.0.1",
"description": "A timesheet keeping app based on electron",
"main": "main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/html/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script>
(function() {
const script = document.createElement('script');
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/main.js' : '../../main/main.js';
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/main/index.js' : '../../main/index.js';
document.write(script.outerHTML);
}());
</script>
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/html/menubar.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script>
(function() {
const script = document.createElement('script');
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/menubar.js' : '../../menubar/menubar.js';
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/menubar/index.js' : '../../menubar/index.js';
document.write(script.outerHTML);
}());
</script>
Expand Down
Binary file added build/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icon.icns
Binary file not shown.
Binary file added build/icon.ico
Binary file not shown.
131 changes: 0 additions & 131 deletions package.js

This file was deleted.

33 changes: 23 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
"name": "timesheets",
"name": "Timesheets",
"productName": "Timesheets",
"version": "0.10.0",
"version": "0.0.1",
"description": "A timesheet keeping app based on electron",
"main": "dist/main/main.js",
"main": "dist/main/index.js",
"scripts": {
"test": "cross-env NODE_ENV=test mocha --compilers js:babel-register --recursive --require ./test/setup.js test/**/*.spec.js",
"test-watch": "npm test -- --watch",
"test-e2e": "cross-env NODE_ENV=test mocha --compilers js:babel-register --require ./test/setup.js --require co-mocha ./test/e2e.js",
"lint": "eslint app test *.js",
"hot-server": "node -r babel-register server.js",
"build-main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors",
"build-main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors && cp app/package.json dist/",
"build-renderer": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.production.js --progress --profile --colors && cp -R app/renderer/assets dist/renderer",
"build": "npm run build-main && npm run build-renderer",
"start": "cross-env NODE_ENV=production electron ./",
"start-hot": "cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main/index",
"package": "cross-env NODE_ENV=production node -r babel-register package.js",
"package-all": "npm run package -- --all",
"postinstall": "cd app/ && npm install",
"dev": "concurrently --kill-others \"npm run hot-server\" \"npm run start-hot\"",
"webfont:roboto": "webfont-dl \"https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en\" -o app/renderer/assets/css/fonts/roboto.global.css --woff1=data --svg=omit --ttf=omit --eot=omit",
"webfont:material-icons": "webfont-dl \"https://fonts.googleapis.com/icon?family=Material+Icons\" -o app/renderer/assets/css/fonts/material-icons.global.css --woff1=data --svg=omit --ttf=omit --eot=omit"
"webfont:material-icons": "webfont-dl \"https://fonts.googleapis.com/icon?family=Material+Icons\" -o app/renderer/assets/css/fonts/material-icons.global.css --woff1=data --svg=omit --ttf=omit --eot=omit",
"postinstall": "install-app-deps",
"pack": "build",
"dist": "build"
},
"bin": {
"electron": "./node_modules/.bin/electron"
Expand Down Expand Up @@ -61,7 +63,7 @@
"cross-env": "^1.0.7",
"css-loader": "^0.23.1",
"del": "^2.2.0",
"electron-packager": "^6.0.2",
"electron-builder": "^3.25.0",
"electron-prebuilt": "^1.0.2",
"electron-rebuild": "^1.1.3",
"eslint": "^2.9.0",
Expand All @@ -80,18 +82,29 @@
"react-addons-test-utils": "^15.0.1",
"selenium-webdriver": "^2.53.1",
"sinon": "^1.17.3",
"source-map-support": "^0.4.0",
"style-loader": "^0.13.1",
"webfont-dl": "^0.1.2",
"webpack": "^1.13.0",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.10.0",
"source-map-support": "^0.4.0"
"webpack-hot-middleware": "^2.10.0"
},
"devEngines": {
"node": "4.x || 5.x || 6.x",
"npm": "2.x || 3.x"
},
"contributors": [
"Jack Wilkinson (https://github.com/guacjack)"
]
],
"build": {
"app-bundle-id": "hardchor.timesheets",
"app-category-type": "public.app-category.productivity",
"productName": "Timesheets",
"compression": "normal",
"asar": true
},
"directories": {
"app": "./dist/",
"output": "./release/"
}
}
2 changes: 1 addition & 1 deletion webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
filename: '[name]/index.js',
libraryTarget: 'commonjs2',
},
resolve: {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {

output: {
path: path.resolve(__dirname, 'dist/main'),
filename: 'main.js',
filename: 'index.js',
},

plugins: [
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config = {

path: path.join(__dirname, 'dist', 'renderer'),
publicPath: '../dist/',
filename: '[name]/[name].js',
filename: '[name]/index.js',
},

module: {
Expand Down

0 comments on commit 81150a8

Please sign in to comment.