diff --git a/assets/osx/background.png b/assets/osx/background.png new file mode 100644 index 0000000..028bce3 Binary files /dev/null and b/assets/osx/background.png differ diff --git a/assets/osx/logo.icns b/assets/osx/logo.icns new file mode 100644 index 0000000..799f2b9 Binary files /dev/null and b/assets/osx/logo.icns differ diff --git a/assets/win/logo.ico b/assets/win/logo.ico new file mode 100644 index 0000000..425310a Binary files /dev/null and b/assets/win/logo.ico differ diff --git a/builder.json b/builder.json new file mode 100644 index 0000000..8e945e7 --- /dev/null +++ b/builder.json @@ -0,0 +1,17 @@ + +{ + "osx" : { + "title": "EA Todo", + "background": "assets/osx/background.png", + "icon": "assets/osx/logo.icns", + "icon-size": 128, + "contents": [ + { "x": 355, "y": 125, "type": "link", "path": "/Applications" }, + { "x": 155, "y": 125, "type": "file" } + ] + }, + "win" : { + "title" : "EA Todo", + "icon" : "assets/win/logo.ico" + } +} \ No newline at end of file diff --git a/package.json b/package.json index c1e2d7c..917999e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,19 @@ "description": "Simple TODO application built with Electron and AngularJS.", "main": "main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "electron . --enable-logging", + + "clean": "rm -rf ./dist", + "clean:osx": "rm -rf ./dist/osx", + "clean:win": "rm -rf ./dist/win", + + "pack": "npm run clean && npm run pack:osx && npm run pack:win", + "pack:osx": "npm run clean:osx && electron-packager . \"EA Todo\" --out=dist/osx --platform=darwin --arch=x64 --version=0.36.2 --icon=assets/osx/logo.icns --ignore=dist --ignore=assets --ignore=builder.json --ignore=bower.json --ignore=README.md --ignore=.gitignore --ignore=preview.png", + "pack:win": "npm run clean:win && electron-packager . \"EA Todo\" --out=dist/win --platform=win32 --arch=ia32 --version=0.36.2 --icon=assets/win/logo.ico --ignore=dist --ignore=assets --ignore=builder.json --ignore=bower.json --ignore=README.md --ignore=.gitignore --ignore=preview.png", + + "build": "npm run build:osx && npm run build:win", + "build:osx": "npm run pack:osx && electron-builder \"dist/osx/EA Todo-darwin-x64/EA Todo.app\" --platform=osx --out=\"dist/osx\" --config=builder.json", + "build:win": "npm run pack:win && electron-builder \"dist/win/EA Todo-win32-ia32\" --platform=win --out=\"dist/win\" --config=builder.json" }, "repository": { "type": "git", @@ -24,5 +36,9 @@ "electron-plugins": "0.0.4", "electron-prebuilt": "^0.36.2", "electron-updater": "^0.3.0" + }, + "devDependencies": { + "electron-builder": "^2.5.0", + "electron-packager": "^5.2.0" } }