mirror of
https://github.com/easychen/flowdeer-dist.git
synced 2026-08-28 17:51:53 +08:00
添加electron实现
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
.DS_Store
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Webpack
|
||||
.webpack/
|
||||
|
||||
# Vite
|
||||
.vite/
|
||||
|
||||
# Electron-Forge
|
||||
out/
|
||||
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
packagerConfig: {
|
||||
asar: true,
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
{
|
||||
name: '@electron-forge/maker-squirrel',
|
||||
config: {},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-zip',
|
||||
platforms: ['darwin'],
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-deb',
|
||||
config: {},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-rpm',
|
||||
config: {},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
{
|
||||
name: '@electron-forge/plugin-auto-unpack-natives',
|
||||
config: {},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "flowdeertreeelectron",
|
||||
"productName": "flowdeertreeelectron",
|
||||
"version": "1.0.0",
|
||||
"description": "My Electron application description",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"start": "electron-forge start",
|
||||
"package": "electron-forge package",
|
||||
"make": "electron-forge make",
|
||||
"publish": "electron-forge publish",
|
||||
"lint": "echo \"No linting configured\""
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Easy",
|
||||
"email": "easychen@qq.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
||||
"dependencies": {
|
||||
"electron-squirrel-startup": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^6.4.2",
|
||||
"@electron-forge/maker-deb": "^6.4.2",
|
||||
"@electron-forge/maker-rpm": "^6.4.2",
|
||||
"@electron-forge/maker-squirrel": "^6.4.2",
|
||||
"@electron-forge/maker-zip": "^6.4.2",
|
||||
"@electron-forge/plugin-auto-unpack-natives": "^6.4.2",
|
||||
"electron": "34.2.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
if (require('electron-squirrel-startup')) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 1000,
|
||||
height: 900,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
},
|
||||
icon: path.join(__dirname, 'site', 'fd-logo.png'),
|
||||
frame: false,
|
||||
});
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile(path.join(__dirname, 'site', 'index.html'));
|
||||
|
||||
// Open the DevTools.
|
||||
// mainWindow.webContents.openDevTools();
|
||||
};
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow);
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and import them here.
|
||||
@@ -0,0 +1,2 @@
|
||||
// See the Electron documentation for details on how to use preload scripts:
|
||||
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../docs
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* This is project's console commands configuration for Robo task runner.
|
||||
*
|
||||
* @see https://robo.li/
|
||||
*/
|
||||
class RoboFile extends \Robo\Tasks
|
||||
{
|
||||
// define public methods as commands
|
||||
public function buildMac()
|
||||
{
|
||||
$this->_exec("cd FlowDeerTree && yarn tauri build -t universal-apple-darwin");
|
||||
}
|
||||
|
||||
public function dev()
|
||||
{
|
||||
$this->_exec("cd FlowDeerTree && yarn tauri dev");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import{I as r}from"./index-2098b39e.js";import{I as o}from"./index-5fe2489d.js";import{p as s,I as m,__tla as i}from"./index-320a32c2.js";let n,e,l=Promise.all([(()=>{try{return i}catch{}})()]).then(async()=>{n=function(a,c){var t=s(a);return c===m.STANDARD?r[t]:o[t]},e=function(a){return s(a)}});export{r as IconSvgPaths16,o as IconSvgPaths20,l as __tla,n as getIconPaths,e as iconNameToPathsRecordKey};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as o,a as s,b as i,__tla as l}from"./index-320a32c2.js";let e,c=Promise.all([(()=>{try{return l}catch{}})()]).then(async()=>{e=function(n,_){return o(void 0,void 0,void 0,function(){var t;return s(this,function(a){switch(a.label){case 0:return[4,i(()=>import("./allPaths-5b0e190e.js").then(async r=>(await r.__tla,r)),["./allPaths-5b0e190e.js","./index-2098b39e.js","./index-5fe2489d.js","./index-320a32c2.js","./index-2874b2e9.css"],import.meta.url)];case 1:return t=a.sent().getIconPaths,[2,t(n,_)]}})})}});export{c as __tla,e as allPathsLoader};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{_ as l,a as o,b as s,p as c,I as u,__tla as m}from"./index-320a32c2.js";let n,p=Promise.all([(()=>{try{return m}catch{}})()]).then(async()=>{n=function(_,i){return l(void 0,void 0,void 0,function(){var e,r;return o(this,function(t){switch(t.label){case 0:return e=c(_),i!==u.STANDARD?[3,2]:[4,s(()=>import("./index-2098b39e.js").then(a=>a.I),[],import.meta.url)];case 1:return r=t.sent(),[3,4];case 2:return[4,s(()=>import("./index-5fe2489d.js").then(a=>a.I),[],import.meta.url)];case 3:r=t.sent(),t.label=4;case 4:return[2,r[e]]}})})}});export{p as __tla,n as splitPathsBySizeLoader};
|
||||
Reference in New Issue
Block a user