Permalink
Browse files

clean up package

  • Loading branch information...
1 parent acead09 commit adb35b5befe4fd8bedfdcc1bcd7f739ec291c174 @Rokt33r Rokt33r committed Jan 9, 2016
Showing with 26 additions and 30 deletions.
  1. +11 −0 appdmg.json
  2. +14 −27 gruntfile.js
  3. +1 −3 package.json
View
@@ -0,0 +1,11 @@
+{
+ "title": "Boostnote",
+ "icon": "resources/dmg.icns",
+ "background": "resources/boostnote-install.png",
+ "icon-size": 80,
+ "contents": [
+ { "x": 448, "y": 344, "type": "link", "path": "/Applications" },
+ { "x": 192, "y": 344, "type": "file", "path": "dist/Boostnote-darwin-x64/Boostnote.app" }
+ ]
+
+}
View
@@ -1,9 +1,6 @@
const path = require('path')
const ChildProcess = require('child_process')
const packager = require('electron-packager')
-const appdmg = process.platform === 'darwin'
- ? require('appdmg')
- : null
module.exports = function (grunt) {
var auth_code
@@ -76,7 +73,7 @@ module.exports = function (grunt) {
prune: true,
overwrite: true,
out: path.join(__dirname, 'dist'),
- ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|^\/browser|^\/secret|\.babelrc|\.gitignore|^\/\.gitmodules|^\/gruntfile|^\/readme.md|^\/webpack/
+ ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|^\/browser|^\/secret|\.babelrc|\.gitignore|^\/\.gitmodules|^\/gruntfile|^\/readme.md|^\/webpack|^\/appdmg\.json/
}
switch (platform) {
case 'win':
@@ -143,29 +140,19 @@ module.exports = function (grunt) {
grunt.registerTask('create-osx-installer', function () {
var done = this.async()
-
- var stream = appdmg({
- target: 'dist/Boostnote-mac.dmg',
- basepath: __dirname,
- specification: {
- 'title': 'Boostnote',
- 'icon': 'resources/dmg.icns',
- 'background': 'resources/boostnote-install.png',
- 'icon-size': 80,
- 'contents': [
- { 'x': 448, 'y': 344, 'type': 'link', 'path': '/Applications' },
- { 'x': 192, 'y': 344, 'type': 'file', 'path': 'dist/Boostnote-darwin-x64/Boostnote.app' }
- ]
- }
- })
- stream.on('finish', function () {
- done()
- })
-
- stream.on('error', function (err) {
- grunt.log.writeln(err)
- done(false)
- })
+ var execPath = 'appdmg appdmg.json dist/Boostnote-mac.dmg'
+ grunt.log.writeln(execPath)
+ ChildProcess.exec(execPath,
+ function (err, stdout, stderr) {
+ grunt.log.writeln(stdout)
+ if (err) {
+ grunt.log.writeln(err)
+ grunt.log.writeln(stderr)
+ done(false)
+ return
+ }
+ done()
+ })
})
grunt.registerTask('zip', function (platform) {
View
@@ -72,9 +72,7 @@
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0"
},
- "optionalDependencies": {
- "appdmg": "^0.3.5"
- },
+ "optionalDependencies": {},
"standard": {
"ignore": [],
"globals": [

0 comments on commit adb35b5

Please sign in to comment.