mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-12 17:26:17 +00:00
clean up package
This commit is contained in:
11
appdmg.json
Normal file
11
appdmg.json
Normal file
@@ -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" }
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
41
gruntfile.js
41
gruntfile.js
@@ -1,9 +1,6 @@
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const ChildProcess = require('child_process')
|
const ChildProcess = require('child_process')
|
||||||
const packager = require('electron-packager')
|
const packager = require('electron-packager')
|
||||||
const appdmg = process.platform === 'darwin'
|
|
||||||
? require('appdmg')
|
|
||||||
: null
|
|
||||||
|
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
var auth_code
|
var auth_code
|
||||||
@@ -76,7 +73,7 @@ module.exports = function (grunt) {
|
|||||||
prune: true,
|
prune: true,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
out: path.join(__dirname, 'dist'),
|
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) {
|
switch (platform) {
|
||||||
case 'win':
|
case 'win':
|
||||||
@@ -143,29 +140,19 @@ module.exports = function (grunt) {
|
|||||||
|
|
||||||
grunt.registerTask('create-osx-installer', function () {
|
grunt.registerTask('create-osx-installer', function () {
|
||||||
var done = this.async()
|
var done = this.async()
|
||||||
|
var execPath = 'appdmg appdmg.json dist/Boostnote-mac.dmg'
|
||||||
var stream = appdmg({
|
grunt.log.writeln(execPath)
|
||||||
target: 'dist/Boostnote-mac.dmg',
|
ChildProcess.exec(execPath,
|
||||||
basepath: __dirname,
|
function (err, stdout, stderr) {
|
||||||
specification: {
|
grunt.log.writeln(stdout)
|
||||||
'title': 'Boostnote',
|
if (err) {
|
||||||
'icon': 'resources/dmg.icns',
|
grunt.log.writeln(err)
|
||||||
'background': 'resources/boostnote-install.png',
|
grunt.log.writeln(stderr)
|
||||||
'icon-size': 80,
|
done(false)
|
||||||
'contents': [
|
return
|
||||||
{ 'x': 448, 'y': 344, 'type': 'link', 'path': '/Applications' },
|
}
|
||||||
{ 'x': 192, 'y': 344, 'type': 'file', 'path': 'dist/Boostnote-darwin-x64/Boostnote.app' }
|
done()
|
||||||
]
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
stream.on('finish', function () {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
|
|
||||||
stream.on('error', function (err) {
|
|
||||||
grunt.log.writeln(err)
|
|
||||||
done(false)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
grunt.registerTask('zip', function (platform) {
|
grunt.registerTask('zip', function (platform) {
|
||||||
|
|||||||
@@ -72,9 +72,7 @@
|
|||||||
"webpack": "^1.12.2",
|
"webpack": "^1.12.2",
|
||||||
"webpack-dev-server": "^1.12.0"
|
"webpack-dev-server": "^1.12.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {},
|
||||||
"appdmg": "^0.3.5"
|
|
||||||
},
|
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"globals": [
|
"globals": [
|
||||||
|
|||||||
Reference in New Issue
Block a user