Skip to content

Commit

Permalink
use dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wighawag committed Nov 23, 2023
1 parent bcc03fc commit b60081f
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 51 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# Jolly-Roger
<p align="center">
<a href="https://jolly-roger.eth.limo">
<img src="docs/public/icon.svg" alt="Jolly-Roger Logo" width="500">
</a>
</p>
<p align="center">
<a href="https://twitter.com/jollyroger_eth">
<img alt="Twitter" src="https://img.shields.io/badge/Twitter-1DA1F2?logo=twitter&logoColor=white" />
</a>
<a href="https://github.com/wighawag/jolly-roger#readme">
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/wighawag/jolly-roger">
</a>
<a href="https://github.com/wighawag/jolly-roger/blob/main/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/wighawag/jolly-roger.svg">
</a>
<a href="https://github.com/wighawag/jolly-roger/issues">
<img alt="open issues" src="https://isitmaintained.com/badge/open/wighawag/jolly-roger.svg">
</a>
</p>

---

A template to develop decentralised applications

## How to use?
# How to use?

We are assuming here that you already setup your env as specified in the [initial setup section](#initial-setup)

### install dependencies
## install dependencies

Note here that while you can use `pnpm i`, we recommend you follow the instruction here so you can have everything setup with your own project's name.

Expand All @@ -22,7 +42,7 @@ You can also manually set the name yourself :
pnpm set-name [<new name>] && pnpm i
```

### start!
## start!

Then Assuming you have [zellij](https://zellij.dev/) installed

Expand Down Expand Up @@ -64,7 +84,7 @@ pnpm indexer:dev
pnpm web:dev
```

## Deploying to a network
# Deploying to a network

Just execute the following

Expand All @@ -84,7 +104,7 @@ Then you can deploy your contract
pnpm contracts:deploy <network>
```

## Initial Setup
# Initial Setup

You need to have these installed

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions wezterm.lua → dev/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ wezterm.on('gui-startup', function(cmd)


}
tab:set_title 'jolly-roger'
window:set_title 'jolly-roger'
tab:set_title 'stratagems'
window:set_title 'stratagems'

local pane_indexer = pane:split {
local pane_indexer = pane:split {
args = {'bash', '-i', '-c', 'cd '.. cmd.args[1] .. '; sleep 1; pnpm indexer:dev; bash'},
direction = 'Bottom'
}
Expand Down
6 changes: 3 additions & 3 deletions zellij-attach.kdl → dev/zellij-attach.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ layout {
pane {
pane {}
pane split_direction="vertical" {
pane command="bash" {
pane name="INDEXER" command="bash" {
args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}"
}
pane command="bash" {
pane name="COMMON" command="bash" {
args "-c" "pnpm common:dev; cd common; ${SHELL-bash}"
}
pane command="bash" {
pane name="WEB" command="bash" {
args "-c" "pnpm web:dev; cd web; ${SHELL-bash}"
}
}
Expand Down
10 changes: 5 additions & 5 deletions zellij-remote.kdl → dev/zellij-remote.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ layout {
pane {
pane {}
pane split_direction="vertical" {
pane command="bash" {
pane name="COMPILE" command="bash" {
args "-c" "pnpm contracts:compile:watch; cd contracts; ${SHELL-bash}"
}
pane command="bash" {
pane name="DEPLOY" command="bash" {
args "-c" "pnpm contracts:deploy:watch ${MODE}; cd contracts; ${SHELL-bash}"
}
}
pane split_direction="vertical" {
pane command="bash" {
pane name="INDEXER" command="bash" {
args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}"
}
pane command="bash" {
pane name="COMMON" command="bash" {
args "-c" "pnpm common:dev; cd common; ${SHELL-bash}"
}
pane command="bash" {
pane name="WEB" command="bash" {
args "-c" "pnpm web:dev; cd web; ${SHELL-bash}"
}
}
Expand Down
28 changes: 28 additions & 0 deletions dev/zellij.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
layout {
pane {
pane {}
pane split_direction="vertical" {
pane name="NODE" command="bash" {
args "-c" "pnpm local_node; ${SHELL-bash}"
}
pane name="COMPILE" command="bash" {
args "-c" "pnpm contracts:compile:watch; cd contracts; ${SHELL-bash}"
}
pane name="DEPLOY" command="bash" {
args "-c" "pnpm contracts:deploy:watch; cd contracts; ${SHELL-bash}"
}
}
pane split_direction="vertical" {
pane name="INDEXER" command="bash" {
args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}"
}
pane name="COMMON" command="bash" {
args "-c" "pnpm common:dev; cd common; ${SHELL-bash}"
}
pane name="WEB" command="bash" {
args "-c" "pnpm web:dev; cd web; ${SHELL-bash}"
}
}
}

}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"set-name": "npx [email protected] --ask jolly-roger",
"template-test": "pnpm --filter ./contracts local_node & pnpm run --filter ./contracts deploy localhost ~~ pnpm export -n localhost --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ && pnpm run --filter ./common build && pnpm --filter ./indexer build",
"sync-deps": "syncpack fix-mismatches && pnpm -r format:fix",
"update-deps": "pnpm update -r -i --latest && pnpm sync-deps",
"---------------------- FORMAT ----------------------": "",
"format": "prettier --write . && pnpm -r format",
"format:check": "prettier --check . && pnpm -r format:check",
Expand All @@ -39,10 +40,10 @@
"docs:build": "pnpm contracts:docs && vitepress build docs",
"docs:preview": "vitepress preview docs",
"---------------------- WEB USING EXISTING DEPLOYMENT ----------------------": "",
"zellij-attach": "zellij --layout zellij-attach.kdl a ${npm_package_name}-attach-$MODE || zellij --layout zellij-attach.kdl -s ${npm_package_name}-attach-$MODE",
"zellij-attach": "zellij --layout dev/zellij-attach.kdl a ${npm_package_name}-attach-$MODE || zellij --layout dev/zellij-attach.kdl -s ${npm_package_name}-attach-$MODE",
"attach": "ldenv -m localhost pnpm --filter ./contracts export -n @@MODE --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ pnpm run zellij-attach ~~ @@",
"---------------------- FULL AGAINST AN EXISTING NETWORK ----------------------": "",
"zellij-remote": "zellij --layout zellij-remote.kdl a ${npm_package_name}-remote-$MODE || zellij --layout zellij-remote.kdl -s ${npm_package_name}-remote-$MODE",
"zellij-remote": "zellij --layout dev/zellij-remote.kdl a ${npm_package_name}-remote-$MODE || zellij --layout dev/zellij-remote.kdl -s ${npm_package_name}-remote-$MODE",
"remote": "ldenv pnpm run zellij-remote @@",
"---------------------- DEPLOY ----------------------": "",
"build": "ldenv -m sepolia pnpm run --filter ./contracts export -n @@MODE --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ pnpm run --filter ./common build ~~ pnpm run --filter ./indexer build ~~ pnpm run --filter ./web build ~~ @@",
Expand All @@ -51,8 +52,8 @@
"contracts:deploy:prepare": "ldenv -m localhost ask-env -f contracts/.env.local ETH_NODE_URI_@@MODE MNEMONIC_@@MODE ETHERSCAN_API_KEY:?:ETHERSCAN_API_KEY @@",
"contracts:deploy:watch": "ldenv -m localhost pnpm _contracts:deploy:watch @@",
"---------------------- RUN FULL LOCAL SETUP ----------------------": "",
"start:wezterm": "wezterm --config-file wezterm.lua start $PWD",
"start:wezterm": "wezterm --config-file dev/wezterm.lua start $PWD",
"stop": "zellij kill-session $npm_package_name",
"start": "zellij --layout zellij.kdl a $npm_package_name || zellij --layout zellij.kdl -s $npm_package_name"
"start": "zellij --layout dev/zellij.kdl a $npm_package_name || zellij --layout dev/zellij.kdl -s $npm_package_name"
}
}
30 changes: 0 additions & 30 deletions zellij.kdl

This file was deleted.

0 comments on commit b60081f

Please sign in to comment.