-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding stuff for prebuild, open ports, etc
- Loading branch information
1 parent
550a5ec
commit 9613108
Showing
10 changed files
with
135 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
TYPE=$1 | ||
NAME=$2 | ||
|
||
curl -s install.aztec.network | NON_INTERACTIVE=1 BIN_PATH=/usr/local/bin bash -s | ||
docker compose -f $HOME/.aztec/docker-compose.yml pull | ||
|
||
if ! grep -q "PXE_URL" ~/.bashrc; then | ||
echo "export PXE_URL=https://\$CODESPACE_NAME-8080.preview.\$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" >> ~/.bashrc | ||
fi | ||
|
||
echo 'y' | npx create-aztec-app -t $TYPE -n $NAME -s | ||
mv react/* . | ||
rm -rf react | ||
|
||
yarn | ||
|
||
npx -y playwright install --with-deps | ||
yarn prep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env bash | ||
TYPE=$1 | ||
NAME=$2 | ||
|
||
# apt install gh | ||
# gh codespace ports visibility 8080:public -c $CODESPACE_NAME | ||
|
||
# (nohup /usr/local/bin/aztec sandbox &) | ||
|
||
r=$(tput sgr0) # Reset color | ||
bold=$(tput bold) # Bold text | ||
g=$(tput setaf 46) # Light Green | ||
b=$(tput setaf 21) # Bright Blue | ||
p=$(tput setaf 13) # Magenta | ||
y=$(tput setaf 226) # Bright Yellow | ||
c=$(tput setaf 51) # Cyan | ||
o=$(tput setaf 208) # Orange | ||
|
||
# Function to print colored text | ||
print_colored() { | ||
case $2 in | ||
green) | ||
color=$g | ||
;; | ||
blue) | ||
color=$b | ||
;; | ||
magenta) | ||
color=$p | ||
;; | ||
yellow) | ||
color=$y | ||
;; | ||
cyan) | ||
color=$c | ||
;; | ||
orange) | ||
color=$o | ||
;; | ||
*) | ||
color=$r | ||
;; | ||
esac | ||
echo "${color}$1${r}" | ||
} | ||
|
||
echo | ||
echo "${bold}${c} █████╗ ███████╗████████╗███████╗ ██████╗${r}" | ||
echo "${bold}${o}██╔══██╗╚══███╔╝╚══██╔══╝██╔════╝██╔════╝${r}" | ||
echo "${bold}${g}███████║ ███╔╝ ██║ █████╗ ██║${r}" | ||
echo "${bold}${b}██╔══██║ ███╔╝ ██║ ██╔══╝ ██║${r}" | ||
echo "${bold}${p}██║ ██║███████╗ ██║ ███████╗╚██████╗${r}" | ||
echo "${bold}${y}╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝ ╚═════╝${r}" | ||
echo | ||
print_colored "${bold}Sandbox Codespace" "cyan" | ||
print_colored "${bold}Your codespace is ready with your chosen box! 🎉" "cyan" | ||
echo | ||
print_colored "All the packages are already installed, and you can now run yarn dev or any other package.json script." "magenta" | ||
print_colored "You can also use this codespace for its running sandbox, by connecting your local environment to it." "magenta" | ||
echo | ||
print_colored "To do so, set the PXE_URL to this codespace's sandbox URL:" "magenta" | ||
print_colored "${PXE_URL}" "green" | ||
print_colored "ex. PXE_URL=\"${PXE_URL}\" yarn dev" | ||
echo | ||
print_colored "${bold}Enjoy your sandbox! 🏖️" "orange" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
{ | ||
"name": "Vanilla JS/TS", | ||
"name": "Vanilla Typescript App", | ||
"image": "node:lts-bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
}, | ||
"onCreateCommand": "curl -s install.aztec.network | NON_INTERACTIVE=1 BIN_PATH=/usr/local/bin bash -s && echo 'y' | npx create-aztec-app -t app -n vanilla -s && cd vanilla && yarn", | ||
"postAttachCommand": "(nohup /usr/local/bin/aztec sandbox &) && cd vanilla", | ||
"onCreateCommand": ".devcontainer/scripts/onCreateCommand.sh app vanilla", | ||
"postAttachCommand": ".devcontainer/scripts/postAttachCommand.sh app vanilla", | ||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": ["noir-lang.vscode-noir"] | ||
} | ||
}, | ||
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/vanilla,target=/root/workspace,type=bind", | ||
"workspaceFolder": "/root/workspace" | ||
"workspaceFolder": "/root/workspace", | ||
"hostRequirements": { | ||
"cpus": 8, | ||
"memory": "8gb", | ||
"storage": "32gb" | ||
}, | ||
"mounts": [ | ||
{ | ||
"source": "${localWorkspaceFolder}/.devcontainer/scripts", | ||
"target": "/root/workspace/.devcontainer/scripts", | ||
"type": "bind" | ||
} | ||
], | ||
"forwardPorts": [8080] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "create-aztec-app", | ||
"packageManager": "[email protected]", | ||
"version": "0.3.15", | ||
"version": "0.3.16", | ||
"type": "module", | ||
"scripts": { | ||
"compile": "yarn workspaces foreach -A -v run compile", | ||
|