Skip to content

Commit

Permalink
feat: add replit base conf (#277)
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Froment <[email protected]>
Co-authored-by: Oak <[email protected]>
  • Loading branch information
sfroment and d-roak authored Dec 9, 2024
1 parent 9b805df commit 392479d
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
modules = ["nodejs-20", "bash"]

[run]
args = ["sh", "-c", "pnpm i && cd examples/${EXAMPLE} && pnpm dev"]

[nix]
channel = "stable-24_05"

[deployment.run]
args = ["sh", "-c", "pnpm i && cd examples/${EXAMPLE} && pnpm start"]

[deployment.build]
args = ["sh", "-c", "pnpm i && pnpm build:examples"]

[env]
EXAMPLE = "grid"

[[ports]]
localPort = 5173
externalPort = 80
exposeLocalhost = true
16 changes: 16 additions & 0 deletions docs/replit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Replit

## How to run on Replit

1. Go to [Replit](https://replit.com/~)
2. Click on `Create a Repl`
![](./screenshot/create-repl.jpg)
3. Click on `Import from GitHub`
![](./screenshot/import-from-github-step-1.jpg)
4. Enter `https://github.com/topology-foundation/ts-drp` in the `GitHub repository` field (you can also connect your GitHub account and select the repository from there)
![](./screenshot/import-from-github-step-2.jpg)
5. Click on `Import from GitHub`
![](./screenshot/import-from-github-step-3.jpg)
1. Run or Deploy the Repl
![](./screenshot/run-or-deploy.jpg)

Binary file added docs/screenshot/create-repl.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshot/import-from-github-step-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshot/import-from-github-step-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshot/import-from-github-step-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshot/run-or-deploy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion examples/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"build": "vite build",
"clean": "rm -rf dist/ node_modules/",
"dev": "vite serve"
"dev": "vite serve",
"start": "vite preview --host --port 5173"
},
"dependencies": {
"@ts-drp/node": "0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "vite build",
"clean": "rm -rf dist/ node_modules/",
"dev": "vite serve",
"start": "ts-node ./src/index.ts"
"start": "vite preview --host --port 5173"
},
"dependencies": {
"@ts-drp/node": "0.4.0",
Expand Down
3 changes: 2 additions & 1 deletion examples/grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"build": "vite build",
"clean": "rm -rf dist/ node_modules/",
"dev": "vite serve"
"dev": "vite serve",
"start": "vite preview --host --port 5173"
},
"dependencies": {
"@ts-drp/node": "0.4.0",
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
"scripts": {
"bench": "vitest bench",
"biome-check": "biome check",
"build": "pnpm build:packages && pnpm build:examples",
"build:examples": "pnpm --filter 'ts-drp-example*' build",
"build:packages": "pnpm --filter '@ts-drp/*' build",
"clean": "pnpm --filter '@ts-drp/*' clean && rm -r node_modules/ docs/",
"docs": "typedoc",
"postinstall": "pnpm --filter '@ts-drp/*' build",
"postinstall": "pnpm build:packages",
"proto-gen": "pnpm proto-gen:object && pnpm proto-gen:network",
"proto-gen:object": "buf generate packages/object/src/proto -o packages/object/src/proto",
"proto-gen:network": "buf generate packages/network/src/proto -o packages/network/src/proto",
"proto-gen:object": "buf generate packages/object/src/proto -o packages/object/src/proto",
"release": "release-it",
"test": "vitest"
},
Expand Down

0 comments on commit 392479d

Please sign in to comment.