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
|
_surf_the_\_web_adrift\_
|
||||||
ADrift is a Decentralized proxy utilizing the WebRTC protocol.
|
|
||||||
|
# Adrift
|
||||||
|
|
||||||
|
Adrift is a Decentralized proxy utilizing the WebRTC protocol.
|
||||||
|
|
||||||
### Before everything..
|
### Before everything..
|
||||||
|
|
||||||
install dependencies and build bare-client-custom
|
install dependencies and build bare-client-custom
|
||||||
|
|
||||||
```
|
```
|
||||||
pnpm install
|
pnpm install
|
||||||
cd bare-client-custom
|
cd bare-client-custom
|
||||||
|
@ -12,16 +17,19 @@ cd ..
|
||||||
```
|
```
|
||||||
|
|
||||||
### Getting started
|
### Getting started
|
||||||
|
|
||||||
Currently, there aren't any middle nodes, only an exit node which is requires nodejs to run.
|
Currently, there aren't any middle nodes, only an exit node which is requires nodejs to run.
|
||||||
|
|
||||||
### Getting started with the server
|
### Getting started with the server
|
||||||
|
|
||||||
inside the server/ directory, run `pnpm install`, followed by `pnpm dev`
|
inside the server/ directory, run `pnpm install`, followed by `pnpm dev`
|
||||||
|
|
||||||
### Getting started with the client
|
### Getting started with the client
|
||||||
|
|
||||||
Inside the frontend/ directory, run `pnpm install` and then `VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev`
|
Inside the frontend/ directory, run `pnpm install` and then `VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev`
|
||||||
|
|
||||||
|
|
||||||
### Quick server setup (linux)
|
### Quick server setup (linux)
|
||||||
|
|
||||||
```
|
```
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
pnpm install
|
pnpm install
|
||||||
|
@ -35,6 +43,7 @@ pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### Quick client setup (linux)
|
### Quick client setup (linux)
|
||||||
|
|
||||||
```
|
```
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
pnpm install
|
pnpm install
|
||||||
|
@ -45,4 +54,4 @@ cd ..
|
||||||
cd frontend/
|
cd frontend/
|
||||||
pnpm install
|
pnpm install
|
||||||
VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev
|
VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,7 +2,7 @@ let makeAllPackagesExternalPlugin = {
|
||||||
name: 'make-all-packages-external',
|
name: 'make-all-packages-external',
|
||||||
setup(build) {
|
setup(build) {
|
||||||
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../"
|
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))
|
build.onResolve({ filter }, args => (ignored.includes(args.path) ? { path: args.path, external: true } : null))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ build({
|
||||||
platform: "node",
|
platform: "node",
|
||||||
// format: "esm",
|
// format: "esm",
|
||||||
bundle: true,
|
bundle: true,
|
||||||
outfile: "dist/dist.js",
|
outfile: "dist/main.js",
|
||||||
plugins: [
|
plugins: [
|
||||||
makeAllPackagesExternalPlugin
|
makeAllPackagesExternalPlugin
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "tsx src/main.ts",
|
"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": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2017",
|
"target": "ES2017",
|
||||||
"module": "ESNext",
|
"module": "CommonJS",
|
||||||
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
|
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue