-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1dd0fd6
Showing
42 changed files
with
13,879 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
out | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
node: true | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
}, | ||
sourceType: 'module', | ||
ecmaVersion: 2021 | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:prettier/recommended' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
dist | ||
out | ||
*.log* | ||
*.idea | ||
DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
out | ||
dist | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
singleQuote: true | ||
semi: false | ||
printWidth: 100 | ||
trailingComma: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Main Process", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" | ||
}, | ||
"runtimeArgs": ["--sourcemap"], | ||
"env": { | ||
"REMOTE_DEBUGGING_PORT": "9222" | ||
} | ||
}, | ||
{ | ||
"name": "Debug Renderer Process", | ||
"port": 9222, | ||
"request": "attach", | ||
"type": "chrome", | ||
"webRoot": "${workspaceFolder}/src/renderer", | ||
"timeout": 60000, | ||
"presentation": { | ||
"hidden": true | ||
} | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Debug All", | ||
"configurations": ["Debug Main Process", "Debug Renderer Process"], | ||
"presentation": { | ||
"order": 1 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# most-explorer | ||
|
||
An Electron application with React | ||
|
||
## Recommended IDE Setup | ||
|
||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
|
||
## Project Setup | ||
|
||
### Install | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
### Development | ||
|
||
```bash | ||
$ npm run dev | ||
``` | ||
|
||
### Build | ||
|
||
```bash | ||
# For windows | ||
$ npm run build:win | ||
|
||
# For macOS | ||
$ npm run build:mac | ||
|
||
# For Linux | ||
$ npm run build:linux | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const { notarize } = require('@electron/notarize') | ||
|
||
module.exports = async (context) => { | ||
if (process.platform !== 'darwin') return | ||
|
||
console.log('aftersign hook triggered, start to notarize app.') | ||
|
||
if (!process.env.CI) { | ||
console.log(`skipping notarizing, not in CI.`) | ||
return | ||
} | ||
|
||
if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) { | ||
console.warn('skipping notarizing, APPLE_ID and APPLE_ID_PASS env variables must be set.') | ||
return | ||
} | ||
|
||
const appId = 'com.electron.app' | ||
|
||
const { appOutDir } = context | ||
|
||
const appName = context.packager.appInfo.productFilename | ||
|
||
try { | ||
await notarize({ | ||
appBundleId: appId, | ||
appPath: `${appOutDir}/${appName}.app`, | ||
appleId: process.env.APPLE_ID, | ||
appleIdPassword: process.env.APPLEIDPASS | ||
}) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
|
||
console.log(`done notarizing ${appId}.`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
appId: com.moderndaymods.app | ||
productName: most-explorer | ||
directories: | ||
buildResources: build | ||
files: | ||
- '!**/.vscode/*' | ||
- '!src/*' | ||
- '!electron.vite.config.{js,ts,mjs,cjs}' | ||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' | ||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' | ||
asarUnpack: | ||
- resources/** | ||
afterSign: build/notarize.js | ||
win: | ||
executableName: most-explorer | ||
nsis: | ||
artifactName: ${name}-${version}-setup.${ext} | ||
shortcutName: ${productName} | ||
uninstallDisplayName: ${productName} | ||
createDesktopShortcut: always | ||
mac: | ||
entitlementsInherit: build/entitlements.mac.plist | ||
extendInfo: | ||
- NSCameraUsageDescription: Application requests access to the device's camera. | ||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. | ||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. | ||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. | ||
dmg: | ||
artifactName: ${name}-${version}.${ext} | ||
linux: | ||
target: | ||
- AppImage | ||
- snap | ||
- deb | ||
maintainer: electronjs.org | ||
category: Utility | ||
appImage: | ||
artifactName: ${name}-${version}.${ext} | ||
npmRebuild: false | ||
publish: | ||
provider: generic | ||
url: https://example.com/auto-updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { resolve } from 'path' | ||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
renderer: { | ||
resolve: { | ||
alias: { | ||
'@renderer': resolve('src/renderer/src') | ||
} | ||
}, | ||
plugins: [react()] | ||
} | ||
}) |
Oops, something went wrong.