Skip to content

Commit c7d1243

Browse files
committed
feat: add figlet dependency and enhance CLI demo with dynamic steps and ASCII art
1 parent 9a12b0c commit c7d1243

File tree

4 files changed

+337
-136
lines changed

4 files changed

+337
-136
lines changed

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@vueuse/core": "^13.6.0",
2121
"@wagmi/vue": "^0.1.24",
2222
"clsx": "^2.1.1",
23+
"figlet": "^1.8.2",
2324
"pinia": "^3.0.3",
2425
"reka-ui": "^2.4.1",
2526
"tailwind-merge": "^3.3.1",
@@ -33,6 +34,7 @@
3334
"devDependencies": {
3435
"@iconify/vue": "^5.0.0",
3536
"@shikijs/vitepress-twoslash": "^3.8.0",
37+
"@types/figlet": "^1.7.0",
3638
"@types/prop-types": "^15.7.15",
3739
"@types/react": "^18.3.23",
3840
"prettier": "^3.6.2",

src/build-iapp/guides/build-&-deploy.md

Lines changed: 120 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,130 @@ bun add -g @iexec/iapp
5959

6060
:::
6161

62-
<script setup>
63-
import CLIDemo from '../../components/CLIDemo.vue';
64-
</script>
65-
6662
## Quick Start
6763

6864
Once installed, you can create and deploy your first iApp. The CLI will guide
6965
you through an interactive setup process:
7066

71-
<CLIDemo />
67+
<CLIDemo
68+
initialCommand="iapp init"
69+
asciiText="iApp"
70+
:steps="[
71+
{
72+
showAt: 2,
73+
question: 'What is your project name? (A folder with this name will be created)',
74+
answer: 'hello-world',
75+
showTyping: true,
76+
isComplete: false
77+
},
78+
{
79+
showAt: 4,
80+
completeAt: 6,
81+
question: 'Which language do you want to use?',
82+
answer: 'JavaScript',
83+
options: [
84+
{ label: 'JavaScript', selected: true },
85+
{ label: 'Python', selected: false }
86+
],
87+
highlighted: false,
88+
isComplete: false
89+
},
90+
{
91+
showAt: 6,
92+
completeAt: 8,
93+
question: 'What kind of project do you want to init?',
94+
answer: 'Hello World',
95+
options: [
96+
{ label: 'Hello World - iapp quick start', selected: true },
97+
{ label: 'advanced', selected: false }
98+
],
99+
highlighted: false,
100+
isComplete: false
101+
}
102+
]"
103+
:completionStep="8"
104+
:completionMessage="'Generating your iApp...'"
105+
:completionItems="[
106+
'📁 Created hello-world/',
107+
'📄 Added package.json',
108+
'🐳 Added Dockerfile',
109+
'⚙️ Added iExec configuration'
110+
]"
111+
:successMessage="'Your iApp is ready!'"
112+
/>
72113

73114
After the interactive setup, continue with development and deployment:
74115

75-
```bash
76-
# Navigate to your project
77-
cd hello-world
78-
79-
# Develop and test locally (simulates TEE environment)
80-
iapp test
81-
82-
# Deploy to the network
83-
iapp deploy
84-
```
116+
## Development and Testing
117+
118+
Navigate to your project and run tests locally to simulate the TEE environment:
119+
120+
<CLIDemo
121+
:initialCommand="'iapp test'"
122+
:steps="[
123+
{
124+
showAt: 2,
125+
question: 'Running tests in simulated TEE environment...',
126+
answer: '✅ All tests passed',
127+
showTyping: true,
128+
isComplete: false
129+
},
130+
{
131+
showAt: 4,
132+
question: 'Building package...',
133+
answer: '📦 Package built successfully',
134+
showTyping: true,
135+
isComplete: false
136+
}
137+
]"
138+
:completionStep="6"
139+
:completionMessage="'Running tests and building package...'"
140+
:completionItems="[
141+
'🧪 Running unit tests...',
142+
'✅ All tests passed',
143+
'📦 Building package...',
144+
'🔍 Code analysis complete',
145+
'🚀 Ready for deployment'
146+
]"
147+
:successMessage="'Build successful! Ready for deployment.'"
148+
:autoRestart="false"
149+
/>
150+
151+
## Deployment
152+
153+
Once your tests pass and the package is built, deploy your iApp to the iExec
154+
network:
155+
156+
<CLIDemo
157+
initialCommand="iapp deploy"
158+
:steps="[
159+
{
160+
showAt: 2,
161+
question: 'Connecting to iExec network...',
162+
answer: '🌐 Connected to Arbitrum',
163+
showTyping: true,
164+
isComplete: false
165+
},
166+
{
167+
showAt: 4,
168+
question: 'Uploading package...',
169+
answer: '📤 Package uploaded',
170+
showTyping: true,
171+
isComplete: false
172+
}
173+
]"
174+
:completionStep="5"
175+
:completionMessage="'Deploying to iExec network...'"
176+
:completionItems="[
177+
'🌐 Connecting to network...',
178+
'🔐 Authenticating...',
179+
'📤 Uploading package...',
180+
'🔍 Verifying deployment...',
181+
'📋 Contract deployed'
182+
]"
183+
:successMessage="'Successfully deployed to iExec network!'"
184+
:autoRestart="false"
185+
/>
85186

86187
<div class="bg-gradient-to-r from-blue-400/10 to-blue-400/5 rounded-[6px] p-4 border-l-4 border-blue-600 mb-6">
87188
<p class="m-0! text-sm"><strong>Note:</strong> iApp Generator currently supports Python and Node.js, but iApps can be built in any language that runs in Docker.</p>
@@ -168,3 +269,7 @@ for month in range(12):
168269
```
169270

170271
:::
272+
273+
<script setup>
274+
import CLIDemo from '../../components/CLIDemo.vue';
275+
</script>

0 commit comments

Comments
 (0)