-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(boxes): adding an init command for an empty project (#7398)
Quick PR to add a `npx aztec-app init` command that provides a `nargo new`-like feature. This will be used in tutorials and specially in the EthCC workshop. --------- Co-authored-by: josh crites <[email protected]>
- Loading branch information
1 parent
59b92ca
commit a6a605d
Showing
16 changed files
with
269 additions
and
229 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "Sandbox Only", | ||
"image": "node:lts-bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
}, | ||
"onCreateCommand": "cp -R /root/workspace /root/scripts && rm -rf /root/workspace/* && sh /root/scripts/onCreateCommand.sh sandbox_only", | ||
"postAttachCommand": "sh /root/scripts/postAttachCommand.sh", | ||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": ["noir-lang.vscode-noir"] | ||
} | ||
}, | ||
"workspaceMount": "source=${localWorkspaceFolder}/.devcontainer/scripts,target=/root/workspace,type=bind", | ||
"workspaceFolder": "/root/workspace", | ||
"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
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,6 @@ | ||
[package] | ||
name = "init" | ||
type = "contract" | ||
|
||
[dependencies] | ||
aztec = { path = "../../noir-projects/aztec-nr/aztec" } |
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,9 @@ | ||
{ | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"dependencies": { | ||
"@aztec/accounts": "latest", | ||
"@aztec/aztec.js": "latest", | ||
"@aztec/builder": "latest" | ||
} | ||
} |
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,6 @@ | ||
|
||
contract Main { | ||
#[aztec(private)] | ||
#[aztec(initializer)] | ||
fn constructor() { } | ||
} |
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", | ||
"name": "aztec-app", | ||
"packageManager": "[email protected]", | ||
"version": "0.4.4", | ||
"version": "0.4.9", | ||
"type": "module", | ||
"scripts": { | ||
"compile": "yarn workspaces foreach -A -v run compile", | ||
|
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,19 @@ | ||
import { replacePaths } from "./utils.js"; | ||
import { AZTEC_REPO } from "./config.js"; | ||
import tiged from "tiged"; | ||
|
||
export async function init(folder) { | ||
const emitter = tiged(`${AZTEC_REPO}/boxes/init${tag && `#${tag}`}`, { | ||
verbose: true, | ||
}); | ||
emitter.on("info", ({ message }) => debug(message)); | ||
emitter.on("warn", ({ message }) => error(message)); | ||
await emitter.clone(`${folder}`); | ||
|
||
await replacePaths({ | ||
rootDir: `${folder}`, | ||
tag, | ||
version, | ||
prefix: "", | ||
}); | ||
} |
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
Oops, something went wrong.