Skip to content

Commit

Permalink
chore: use js forge config just like https://github.com/electron/fidd…
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jun 27, 2021
1 parent ccacd2e commit d22c24c
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 75 deletions.
64 changes: 64 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
module.exports = {
packagerConfig: {
name: 'TiddlyGit',
executableName: 'TiddlyGit',
icon: 'build-resources/icon.icns',
asar: {
unpack: '**/.webpack/main/*.worker.*',
},
extraResource: ['.webpack/node_modules', 'localization', 'template/wiki', 'build-resources/menubar@2x.png', 'build-resources/menubarTemplate@2x.png'],
mac: {
category: 'productivity',
target: 'dmg',
icon: 'build-resources/icon.icns',
electronLanguages: ['zh_CN', 'en', 'ja'],
},
afterPrune: ['scripts/afterPack.js'],
},
makers: [
{
name: '@electron-forge/maker-squirrel',
platforms: ['win32'],
config: (arch) => {
return {
setupExe: `TiddlyGit-${arch}-setup.exe`,
setupIcon: 'build-resources/icon.ico',
};
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
plugins: [
[
'@electron-forge/plugin-webpack',
{
mainConfig: './webpack.main.config.js',
renderer: {
config: './webpack.renderer.config.js',
entryPoints: [
{
html: './src/renderer.html',
js: './src/renderer.tsx',
preload: {
js: './src/preload/index.ts',
},
name: 'main_window',
},
],
},
},
],
],
};
75 changes: 0 additions & 75 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,81 +24,6 @@
"repository": "https://github.com/tiddly-gittly/TiddlyGit-Desktop",
"author": "Lin Onetwo<linonetwo012@gmail.com>, Quang Lam <quang.lam2807@gmail.com>",
"main": ".webpack/main",
"config": {
"forge": {
"packagerConfig": {
"name": "TiddlyGit",
"executableName": "TiddlyGit",
"icon": "build-resources/icon.icns",
"asar": {
"unpack": "**/.webpack/main/*.worker.*"
},
"extraResource": [
".webpack/node_modules",
"localization",
"template/wiki",
"build-resources/menubar@2x.png",
"build-resources/menubarTemplate@2x.png"
],
"mac": {
"category": "productivity",
"target": "dmg",
"icon": "build-resources/icon.icns",
"electronLanguages": [
"zh_CN",
"en",
"ja"
]
},
"afterPrune": [
"scripts/afterPack.js"
]
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"setupIcon": "build-resources/icon.ico"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/renderer.html",
"js": "./src/renderer.tsx",
"preload": {
"js": "./src/preload/index.ts"
},
"name": "main_window"
}
]
}
}
]
]
}
},
"dependencies": {
"@dnd-kit/core": "3.1.1",
"@dnd-kit/modifiers": "3.0.0",
Expand Down

0 comments on commit d22c24c

Please sign in to comment.