Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": ["@babel/plugin-transform-runtime"]
}
99 changes: 99 additions & 0 deletions assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Html Webpack Plugin:
<pre>
Error: Child compilation failed:
Entry module not found: Error: Can't resolve '/Users/liuguo/repos/hypha-desktop/src/static/index.html' in '/Users/li uguo/repos/hypha-desktop/src':
Error: Can't resolve '/Users/liuguo/repos/hypha-desktop/src/static/index.html' in '/Users/liuguo/repos/hypha-desktop /src'

- compiler.js:79
[hypha-desktop]/[html-webpack-plugin]/lib/compiler.js:79:16

- Compiler.js:343
[hypha-desktop]/[webpack]/lib/Compiler.js:343:11

- Compiler.js:671
[hypha-desktop]/[webpack]/lib/Compiler.js:671:15


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compiler.js:668
[hypha-desktop]/[webpack]/lib/Compiler.js:668:31


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1385
[hypha-desktop]/[webpack]/lib/Compilation.js:1385:35


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1376
[hypha-desktop]/[webpack]/lib/Compilation.js:1376:32


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1371
[hypha-desktop]/[webpack]/lib/Compilation.js:1371:36


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1367
[hypha-desktop]/[webpack]/lib/Compilation.js:1367:32


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1304 Compilation.seal
[hypha-desktop]/[webpack]/lib/Compilation.js:1304:27

- Compiler.js:665
[hypha-desktop]/[webpack]/lib/Compiler.js:665:18

- Compilation.js:1224
[hypha-desktop]/[webpack]/lib/Compilation.js:1224:4


- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[hypha-desktop]/[tapable]/lib/Hook.js:154:20

- Compilation.js:1216 Compilation.finish
[hypha-desktop]/[webpack]/lib/Compilation.js:1216:28

- Compiler.js:662
[hypha-desktop]/[webpack]/lib/Compiler.js:662:17


- Compilation.js:1148
[hypha-desktop]/[webpack]/lib/Compilation.js:1148:12

- Compilation.js:1007 errorAndCallback
[hypha-desktop]/[webpack]/lib/Compilation.js:1007:6

- Compilation.js:1038
[hypha-desktop]/[webpack]/lib/Compilation.js:1038:14

- NormalModuleFactory.js:401
[hypha-desktop]/[webpack]/lib/NormalModuleFactory.js:401:22

- NormalModuleFactory.js:130
[hypha-desktop]/[webpack]/lib/NormalModuleFactory.js:130:21

- NormalModuleFactory.js:224
[hypha-desktop]/[webpack]/lib/NormalModuleFactory.js:224:22

- async.js:2830
[hypha-desktop]/[neo-async]/async.js:2830:7

- async.js:6877
[hypha-desktop]/[neo-async]/async.js:6877:13

</pre><script type="text/javascript" src="index.js"></script>
100 changes: 100 additions & 0 deletions assets/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
"description": "Hypha Desktop Application",
"main": "out/index.js",
"scripts": {
"build:pre": "npm run build:module; npm run build:copy; npm run build:ui",
"build:pre": "npm run build:module; npm run build:copy; npm run build:ui; npm run build:main",
"build:copy": "babel src --out-dir out --copy-files; shx rm -rf out/ui",
"build:module": "npm install .",
"build:main": "tsc -p tsconfig.json",
"build:ui": "webpack --env production --colors --config webpack.ui.config.js",
"build:electron": "electron-builder",
"clean:ui": "shx rm -rf assets/ui/",
"dev:electron": "wait-on assets/ui/index.js; cross-env NODE_ENV=development electron -r @babel/register src/index.js",
"dev:electron": "wait-on assets/ui/index.js npm run build:main; concurrently \"tsc -p tsconfig.json -w\" \"cross-env NODE_ENV=development electron -r @babel/register out/index.js\"",
"dev:ui": "webpack --env development --colors --config webpack.ui.config.js",
"format:ui": "prettier --write \"src/ui/**/*.{js,json}\"",
"format:ui": "prettier --write \"src/ui/**/*.{js,json,ts,tsx,css}\"",
"start:dev": "NODE_ENV=development npm run clean:ui; concurrently \"npm:dev:ui\" \"npm:dev:electron\""
},
"husky": {
Expand Down Expand Up @@ -46,6 +47,7 @@
"@svgr/webpack": "^4.3.2",
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.4",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.6",
"concurrently": "^4.1.1",
"copy-webpack-plugin": "^5.0.3",
Expand All @@ -59,35 +61,30 @@
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"shx": "^0.3.2",
"source-map-loader": "^1.0.0",
"style-loader": "^0.23.1",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"typings-for-css-modules-loader": "^1.7.0",
"wait-on": "^3.3.0",
"webpack": "^4.35.3",
"webpack-build-notifier": "^1.0.3",
"webpack-cli": "^3.3.6"
},
"dependencies": {
"@apollo/react-hooks": "^3.1.0",
"@babel/runtime": "^7.5.4",
"apollo-cache-inmemory": "^1.6.3",
"apollo-client": "^2.6.4",
"apollo-link-http": "^1.5.16",
"cheerio": "^1.0.0-rc.3",
"classnames": "^2.2.6",
"electron-store": "^4.0.0",
"file-type": "^12.0.1",
"fix-path": "^2.1.0",
"go-ipfs-dep": "0.4.21",
"graphql": "^14.5.4",
"graphql-tag": "^2.10.1",
"graphql-tools": "^4.0.5",
"graphql-transport-electron": "^1.0.1",
"ipfs-http-client": "^33.1.0",
"ipfsd-ctl": "^0.44.1",
"is-ipfs": "^0.6.1",
"isomorphic-fetch": "^2.2.1",
"iterall": "^1.2.2",
"lodash": "^4.17.15",
"node-fetch": "^2.6.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-feather": "^2.0.3"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "*.css"
12 changes: 6 additions & 6 deletions src/index.js → src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { app } from 'electron'
import fixPath from 'fix-path'
import { app } from "electron"
import fixPath from "fix-path"

import main from './main'
import main from "./main"

fixPath()

app.setAppUserModelId('io.hypha.desktop')
app.setAppUserModelId("io.hypha.desktop")

if (app.dock) {
app.dock.hide()
Expand All @@ -15,8 +15,8 @@ if (!app.requestSingleInstanceLock()) {
process.exit(0)
}

process.on('uncaughtException', console.log)
process.on('unhandledRejection', console.log)
process.on("uncaughtException", console.log)
process.on("unhandledRejection", console.log)

const context = {}

Expand Down
13 changes: 0 additions & 13 deletions src/main/index.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import makeMenu from "./makeMenu"
import makeTray from "./makeTray"
import makeUI from "./makeUi"
import runDaemon from "./runDaemon"

export default async (context) => {
await runDaemon(context)
await makeMenu(context)
await makeTray(context)
await makeUI(context)
}
47 changes: 0 additions & 47 deletions src/main/makeMenu.js

This file was deleted.

Loading