mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
add standalone binary build step
This commit is contained in:
parent
dda5302931
commit
b06e0a85ab
4 changed files with 18 additions and 8 deletions
17
README.md
17
README.md
|
@ -1,8 +1,13 @@
|
|||
# ADrift
|
||||
ADrift is a Decentralized proxy utilizing the WebRTC protocol.
|
||||
_surf_the_\_web_adrift\_
|
||||
|
||||
# Adrift
|
||||
|
||||
Adrift is a Decentralized proxy utilizing the WebRTC protocol.
|
||||
|
||||
### Before everything..
|
||||
|
||||
install dependencies and build bare-client-custom
|
||||
|
||||
```
|
||||
pnpm install
|
||||
cd bare-client-custom
|
||||
|
@ -12,16 +17,19 @@ cd ..
|
|||
```
|
||||
|
||||
### Getting started
|
||||
|
||||
Currently, there aren't any middle nodes, only an exit node which is requires nodejs to run.
|
||||
|
||||
### Getting started with the server
|
||||
|
||||
inside the server/ directory, run `pnpm install`, followed by `pnpm dev`
|
||||
|
||||
### Getting started with the client
|
||||
|
||||
Inside the frontend/ directory, run `pnpm install` and then `VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev`
|
||||
|
||||
|
||||
### Quick server setup (linux)
|
||||
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
pnpm install
|
||||
|
@ -35,6 +43,7 @@ pnpm dev
|
|||
```
|
||||
|
||||
### Quick client setup (linux)
|
||||
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
pnpm install
|
||||
|
@ -45,4 +54,4 @@ cd ..
|
|||
cd frontend/
|
||||
pnpm install
|
||||
VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev
|
||||
```
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@ let makeAllPackagesExternalPlugin = {
|
|||
name: 'make-all-packages-external',
|
||||
setup(build) {
|
||||
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../"
|
||||
let ignored = []
|
||||
let ignored = ["wrtc"]
|
||||
build.onResolve({ filter }, args => (ignored.includes(args.path) ? { path: args.path, external: true } : null))
|
||||
},
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ build({
|
|||
platform: "node",
|
||||
// format: "esm",
|
||||
bundle: true,
|
||||
outfile: "dist/dist.js",
|
||||
outfile: "dist/main.js",
|
||||
plugins: [
|
||||
makeAllPackagesExternalPlugin
|
||||
],
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"main": "src/main.ts",
|
||||
"scripts": {
|
||||
"start": "tsx src/main.ts",
|
||||
"dev": "tsx src/dev.ts"
|
||||
"dev": "tsx src/dev.ts",
|
||||
"prod": "node esbuild.bundle.js && pkg src/main.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"module": "ESNext",
|
||||
"module": "CommonJS",
|
||||
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue