2020-12-23 01:14:52 +03:00
|
|
|
const fss = require('fs')
|
|
|
|
|
|
|
|
function get_build_config() {
|
|
|
|
const buildInfoPath = paths.dist.buildInfo
|
|
|
|
|
|
|
|
let exists = fss.existsSync(buildInfoPath)
|
|
|
|
if (exists) {
|
|
|
|
let configFile = fss.readFileSync(buildInfoPath)
|
|
|
|
return JSON.parse(configFile.toString())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const build = get_build_config()
|
|
|
|
|
2020-03-16 05:58:00 +03:00
|
|
|
let config = {
|
2020-12-30 06:37:51 +03:00
|
|
|
name: "Enso",
|
|
|
|
description: "Enso Data Processing Environment.",
|
2020-03-16 05:58:00 +03:00
|
|
|
main: "index.js",
|
|
|
|
|
|
|
|
dependencies: {
|
2020-03-17 05:44:27 +03:00
|
|
|
"create-servers": "^3.1.0",
|
|
|
|
"electron-is-dev": "^1.1.0",
|
2020-03-16 05:58:00 +03:00
|
|
|
"enso-studio-common": "2.0.0-alpha.0",
|
2020-03-17 05:44:27 +03:00
|
|
|
"enso-studio-content": "2.0.0-alpha.0",
|
2020-03-16 05:58:00 +03:00
|
|
|
"enso-studio-icons": "2.0.0-alpha.0",
|
2020-03-17 05:44:27 +03:00
|
|
|
"yargs": "^15.3.0"
|
2020-03-16 05:58:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
devDependencies: {
|
|
|
|
"compression-webpack-plugin": "^3.1.0",
|
|
|
|
"copy-webpack-plugin": "^5.1.1",
|
|
|
|
"devtron": "^1.4.0",
|
2020-12-30 06:37:51 +03:00
|
|
|
"electron": "11.1.1",
|
|
|
|
"electron-builder": "^22.9.1"
|
2020-03-16 05:58:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
scripts: {
|
2020-12-23 01:14:52 +03:00
|
|
|
start: `electron ${paths.dist.content} -- `,
|
|
|
|
build: 'webpack ',
|
|
|
|
dist: 'electron-builder --publish never' + ' --' + build.target,
|
|
|
|
},
|
2020-03-16 05:58:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
config.build = {
|
2020-12-30 06:37:51 +03:00
|
|
|
appId: 'org.enso',
|
|
|
|
productName: 'Enso',
|
2020-12-23 01:14:52 +03:00
|
|
|
copyright: 'Copyright © 2020 ${author}.',
|
2020-03-16 05:58:00 +03:00
|
|
|
mac: {
|
|
|
|
icon: `${paths.dist.root}/icons/icon.icns`,
|
2020-12-23 01:14:52 +03:00
|
|
|
category: 'public.app-category.developer-tools',
|
2020-03-16 05:58:00 +03:00
|
|
|
darkModeSupport: true,
|
2020-12-23 01:14:52 +03:00
|
|
|
type: 'distribution',
|
2020-03-16 05:58:00 +03:00
|
|
|
},
|
|
|
|
win: {
|
|
|
|
icon: `${paths.dist.root}/icons/icon.ico`,
|
|
|
|
},
|
|
|
|
linux: {
|
|
|
|
icon: `${paths.dist.root}/icons/png`,
|
2020-12-23 01:14:52 +03:00
|
|
|
category: 'Development',
|
2020-03-16 05:58:00 +03:00
|
|
|
},
|
|
|
|
files: [
|
2021-01-22 18:30:52 +03:00
|
|
|
{ from: paths.dist.content, to: '.' }
|
|
|
|
],
|
|
|
|
extraResources: [
|
|
|
|
{ from: paths.dist.bin, to: '.' , filter: ["!**.tar.gz", "!**.zip"]}
|
2020-03-16 05:58:00 +03:00
|
|
|
],
|
|
|
|
fileAssociations: [
|
|
|
|
{
|
2020-12-23 01:14:52 +03:00
|
|
|
ext: 'enso',
|
|
|
|
name: 'Enso Source File',
|
|
|
|
role: 'Editor',
|
2020-12-30 06:37:51 +03:00
|
|
|
}
|
2020-03-16 05:58:00 +03:00
|
|
|
],
|
|
|
|
directories: {
|
2020-12-23 01:14:52 +03:00
|
|
|
output: paths.dist.client,
|
2020-04-24 09:52:26 +03:00
|
|
|
},
|
2020-12-23 01:14:52 +03:00
|
|
|
publish: [],
|
2020-03-16 05:58:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {config}
|