2019-12-19 06:17:21 -05:00
|
|
|
const path = require('path')
|
|
|
|
function resolve (dir) {
|
|
|
|
return path.join(__dirname, dir)
|
|
|
|
}
|
|
|
|
module.exports = {
|
|
|
|
chainWebpack: config => {
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', resolve('src/renderer'))
|
|
|
|
.set('~', resolve('src'))
|
|
|
|
.set('root', resolve('./'))
|
|
|
|
.set('#', resolve('src/universal'))
|
|
|
|
},
|
|
|
|
pluginOptions: {
|
|
|
|
electronBuilder: {
|
2019-12-20 05:46:39 -05:00
|
|
|
customFileProtocol: 'picgo://./',
|
|
|
|
externals: ['picgo'],
|
2019-12-19 06:17:21 -05:00
|
|
|
chainWebpackMainProcess: config => {
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', resolve('src/renderer'))
|
|
|
|
.set('~', resolve('src'))
|
|
|
|
.set('root', resolve('./'))
|
|
|
|
.set('#', resolve('src/universal'))
|
|
|
|
},
|
|
|
|
builderOptions: {
|
|
|
|
productName: 'PicGo',
|
|
|
|
appId: 'com.molunerfinn.picgo',
|
2020-01-01 05:18:51 -05:00
|
|
|
publish: [
|
|
|
|
{
|
|
|
|
provider: 'github',
|
|
|
|
owner: 'Molunerfinn',
|
|
|
|
repo: 'PicGo',
|
|
|
|
releaseType: 'draft'
|
|
|
|
}
|
|
|
|
],
|
2019-12-19 06:17:21 -05:00
|
|
|
dmg: {
|
|
|
|
contents: [
|
|
|
|
{
|
|
|
|
x: 410,
|
|
|
|
y: 150,
|
|
|
|
type: 'link',
|
|
|
|
path: '/Applications'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
x: 130,
|
|
|
|
y: 150,
|
|
|
|
type: 'file'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
mac: {
|
|
|
|
icon: 'build/icons/icon.icns',
|
|
|
|
extendInfo: {
|
|
|
|
LSUIElement: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
win: {
|
|
|
|
icon: 'build/icons/icon.ico',
|
|
|
|
target: 'nsis'
|
|
|
|
},
|
|
|
|
nsis: {
|
|
|
|
shortcutName: 'PicGo',
|
|
|
|
oneClick: false,
|
|
|
|
allowToChangeInstallationDirectory: true
|
|
|
|
},
|
|
|
|
linux: {
|
|
|
|
icon: 'build/icons/'
|
2020-01-01 05:18:51 -05:00
|
|
|
},
|
|
|
|
snap: {
|
|
|
|
publish: ['github']
|
2019-12-19 06:17:21 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|