File tree 2 files changed +52
-37
lines changed
2 files changed +52
-37
lines changed Original file line number Diff line number Diff line change
1
+ const path = require ( "path" ) ;
2
+ const fs = require ( 'fs' ) ;
3
+
4
+ module . exports = {
5
+ packagerConfig : {
6
+ packageManager : "npm" ,
7
+ icon : "src/icons/icon" ,
8
+ asar : true ,
9
+ overwrite : true ,
10
+ ignore : [
11
+ "source" ,
12
+ "compile.sh" ,
13
+ "framework" ,
14
+ "README*" ,
15
+ "LICENSE" ,
16
+ "doc" ,
17
+ "dict.dic" ,
18
+ ".gitignore" ,
19
+ ".gitsubmodules" ,
20
+ ".github" ,
21
+ ".idea" ,
22
+ ".vscode"
23
+ ] ,
24
+ extraResource : [
25
+ "framework" ,
26
+ "dict.dic"
27
+ ]
28
+ } ,
29
+ makers : [
30
+ {
31
+ name : "@electron-forge/maker-zip" ,
32
+ platforms : [
33
+ "darwin" ,
34
+ "linux" ,
35
+ "win32"
36
+ ]
37
+ }
38
+ ] ,
39
+ hooks : {
40
+ "packageAfterPrune" : async ( forgeConfig , buildPath ) => {
41
+ if ( process . platform === "win32" ) return ;
42
+ const url = path . join ( buildPath , 'node_modules/@serialport/bindings-cpp/build/node_gyp_bins' )
43
+ fs . unlink ( path . join ( url , "python3" ) , ( err ) => {
44
+ if ( err ) throw err ;
45
+
46
+ fs . rmdir ( url , ( err ) => {
47
+ if ( err ) throw err ;
48
+ } )
49
+ } ) ;
50
+ }
51
+ }
52
+ }
Original file line number Diff line number Diff line change 10
10
"make" : " electron-forge make"
11
11
},
12
12
"license" : " AGPL-3.0" ,
13
- "config" : {
14
- "forge" : {
15
- "packagerConfig" : {
16
- "packageManager" : " npm" ,
17
- "icon" : " src/icons/icon" ,
18
- "asar" : true ,
19
- "overwrite" : true ,
20
- "ignore" : [
21
- " source" ,
22
- " compile.sh" ,
23
- " framework" ,
24
- " README*" ,
25
- " LICENSE" ,
26
- " doc" ,
27
- " dict.dic" ,
28
- " .gitignore" ,
29
- " .gitsubmodules" ,
30
- " .idea" ,
31
- " .vscode"
32
- ],
33
- "extraResource" : [
34
- " framework" ,
35
- " dict.dic"
36
- ]
37
- },
38
- "makers" : [
39
- {
40
- "name" : " @electron-forge/maker-zip" ,
41
- "platforms" : [
42
- " darwin" ,
43
- " linux" ,
44
- " win32"
45
- ]
46
- }
47
- ]
48
- }
49
- },
50
13
"dependencies" : {
51
14
"serialport" : " ^10.5.0"
52
15
},
You can’t perform that action at this time.
0 commit comments