Skip to content

Commit 8053695

Browse files
author
Beichen Li
committed
modify file structure & add package script for electron-packager
1 parent 8aa5b6a commit 8053695

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Desktop application for batch shrinking PDFs**
44
*Best with scanned documents!*
55

6-
[logo](src/ui/img/shrimp.png)
6+
![logo](src/ui/img/shrimp.png)
77

88
## Install ##
99

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/ui/index.html renamed to assets/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</div>
4747
<script>
4848
// script for this rendering process
49-
require('../js/renderer.js')
49+
require('./js/renderer.js')
5050
</script>
5151
</body>
5252
</html>
File renamed without changes.
File renamed without changes.

src/main.js renamed to main.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Electron Main Process
33
* @author bcli
4-
* @see
54
*/
65

76
// Modules to control application life and create native browser window
@@ -24,13 +23,13 @@ function createWindow () {
2423
});
2524

2625
// no resize
27-
win.setResizable(false)
26+
//win.setResizable(false)
2827

2928
// and load the index.html of the app.
30-
win.loadFile(path.join('src','ui','index.html'));
29+
win.loadFile(path.join('assets','index.html'));
3130

3231
// Open the DevTools.
33-
//win.webContents.openDevTools();
32+
win.webContents.openDevTools();
3433

3534
// Emitted when the window is closed.
3635
win.on('closed', function () {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
"Shrink",
1313
"GhostScript"
1414
],
15-
"main": "./src/main.js",
15+
"main": "main.js",
1616
"scripts": {
1717
"start": "npx electron .",
18-
"build": "",
19-
"test": ""
18+
"build-mac": "npx electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/icon-mac.icns --prune=true --out=release-builds",
19+
"build-win": "npx electron-packager . Shrink-Shrimp --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/icon-win.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Shrink Shrimp\"",
20+
"build-linux": "npx electron-packager . Shrink-Shrimp --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/icon-linux.png --prune=true --out=release-builds"
2021
},
2122
"repository": "https://github.com/bclicn/pdf-shrink",
2223
"devDependencies": {

0 commit comments

Comments
 (0)