-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpackage.json
More file actions
153 lines (153 loc) · 6.25 KB
/
package.json
File metadata and controls
153 lines (153 loc) · 6.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"name": "acbr-comic-book-reader",
"version": "3.21.0-alpha1",
"description": "Comic book reader and converter for CBZ, CBR, CB7, EPUB, MOBI, FB2 and PDF files",
"main": "./src/core/main.js",
"author": "Álvaro García (www.binarynonsense.com)",
"license": "BSD-2-Clause",
"repository": {
"type": "git",
"url": "https://github.com/binarynonsense/comic-book-reader"
},
"build": {
"productName": "ACBR Comic Book Reader",
"appId": "com.binarynonsense.acbr",
"electronLanguages": [
"en-US"
],
"files": [
"**/*",
"!src/assets/bin/**/*",
"!tools/**/*",
"!licenses/**/*",
"!.vscode/**/*",
"!docs/**/*",
"!.npmrc",
"!**/node_modules/@img/sharp-libvips-linux-arm64/**/*",
"!**/node_modules/@img/sharp-libvips-win32-ia32/**/*",
"!**/node_modules/@img/sharp-libvips-darwin-x64/**/*",
"!**/node_modules/*/{CHANGELOG.md,README.md,test,tests,examples,docs}",
"!**/*.{map,ts,md,txt}",
"!**/node_modules/.bin/**/*"
],
"win": {
"icon": "./src/assets/images/icon_256x256.png",
"extraResources": [
{
"from": "licenses",
"to": "licenses"
},
{
"from": "src/assets/bin/7zip/win",
"to": "bin/7zip/win"
},
{
"from": "src/assets/bin/mupdf/win",
"to": "bin/mupdf/win"
}
]
},
"linux": {
"category": "Graphics",
"icon": "./src/assets/images/icon_256x256.png",
"target": [
{
"target": "AppImage"
},
{
"target": "deb"
},
{
"target": "flatpak"
}
],
"artifactName": "${name}-${version}.${ext}",
"maintainer": "web@binarynonsense.com",
"extraResources": [
{
"from": "licenses",
"to": "licenses"
},
{
"from": "src/assets/bin/7zip/linux",
"to": "bin/7zip/linux"
},
{
"from": "src/assets/bin/mupdf/linux",
"to": "bin/mupdf/linux"
}
],
"asarUnpack": [
"**/node_modules/sharp/**",
"**/node_modules/@img/**/*"
]
},
"flatpak": {
"finishArgs": [
"--socket=x11",
"--share=ipc",
"--device=dri",
"--socket=pulseaudio",
"--filesystem=home",
"--share=network",
"--device=all",
"--filesystem=/run/udev:ro",
"--env=G_SLICE=always-malloc",
"--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons"
],
"license": "./licenses/acbr.txt",
"baseVersion": "24.08",
"runtimeVersion": "24.08"
}
},
"scripts": {
"start": "electron . --dev",
"start:safe": "systemd-run --user --scope -p MemoryMax=4G -p MemorySwapMax=0 electron . --dev --js-flags=\"--expose-gc\"",
"start:glib": "export G_SLICE=always-malloc && electron . --dev",
"dist:linux": "npm run chmod-bins:linux && npm run build:linux && npm run extras:linux",
"dist:windows": "npm run build:windows && npm run extras:windows",
"dist:cross": "npm run dist:cross-windows && npm run dist:cross-linux",
"dist:cross-linux": "npm run sharp:linux && npm run dist:linux",
"dist:cross-windows": "npm run sharp:windows && npm run dist:windows",
"build:linux": "electron-builder --linux --publish never",
"build:windows": "electron-builder --win --dir --publish never",
"sharp:windows": "del-cli ./node_modules/sharp && npm install --platform=win32 --arch=x64 sharp",
"sharp:linux": "del-cli ./node_modules/sharp && npm install --platform=linux --arch=x64 sharp",
"chmod-bins:linux": "shx chmod +x node_modules/7zip-bin/linux/x64/7za && shx chmod +x src/assets/bin/7zip/linux/7zz && shx chmod +x src/assets/bin/mupdf/linux/mutool",
"extras:linux": "echo '#!/bin/bash\\nexport G_SLICE=always-malloc && ./acbr-comic-book-reader \"$@\"' > ./dist/linux-unpacked/ACBR.sh && shx chmod +x ./dist/linux-unpacked/ACBR.sh && echo '#!/bin/bash\\nexport G_SLICE=always-malloc && ./acbr-comic-book-reader.AppImage \"$@\"' > ./dist/ACBR.sh && shx chmod +x ./dist/ACBR.sh && echo '#!/bin/bash\\nexport G_SLICE=always-malloc && acbr-comic-book-reader \"$@\"' > ./dist/ACBR_deb.sh && shx chmod +x ./dist/ACBR_deb.sh && echo ${npm_package_version} > ./dist/linux-unpacked/VERSION && echo ${npm_package_version} > ./dist/VERSION",
"extras:windows": "echo %npm_package_version% > ./dist/win-unpacked/VERSION",
"licenses": "license-checker > licenses/node_modules.txt && shx sed -i 's/path.*node_modules/path: node_modules/' ./licenses/node_modules.txt && shx sed -i 's/licenseFile.*node_modules/licenseFile: node_modules/' ./licenses/node_modules.txt && npm run localization licenses",
"localization:update": "node ./tools/localization.js update all",
"localization:state": "node ./tools/localization.js state all",
"localization": "node ./tools/localization.js",
"translate": "node ./tools/translate.js",
"make-icons": "node ./tools/make-icons.js",
"check-patches": "jq -r '.dependencies, .devDependencies | to_entries[] | \"\\(.key) \\(.value)\"' package.json | while read pkg cur; do major=$(echo $cur | cut -d. -f1 | tr -d 'v^~\" '); latest=$(npm view \"$pkg@^$major\" version --json 2>/dev/null | jq -r 'if type == \"array\" then .[-1] else . end'); if [ \"$cur\" != \"$latest\" ] && [ -n \"$latest\" ]; then echo \"[UPDATE] $pkg: $cur -> $latest\"; fi; done",
"build:easy-brush": "mkdir -p src/assets/libs/easy-brush && npm install --no-save browserify easy-brush && npx browserify node_modules/easy-brush/dist/index.js --standalone EasyBrush -o src/assets/libs/easy-brush/easy-brush-browser.js && npm uninstall browserify easy-brush"
},
"devDependencies": {
"del-cli": "6.0.0",
"electron": "37.10.3",
"electron-builder": "26.7.0",
"license-checker": "25.0.1",
"shx": "0.4.0",
"snapsvg-cjs": "^0.0.6"
},
"dependencies": {
"adm-zip": "0.5.16",
"axios": "1.13.4",
"custom-electron-titlebar": "4.2.8",
"epub": "1.3.0",
"fast-xml-parser": "5.3.4",
"jsdom": "27.4.0",
"jsqr": "1.4.0",
"music-metadata": "7.13.4",
"node-7z": "3.0.0",
"pdf-lib": "1.17.1",
"pdfkit": "0.17.2",
"qrcode": "1.5.4",
"sanitize-html": "2.17.0",
"sharp": "0.33.5",
"tesseract.js": "3.0.3"
}
}