diff --git a/docs/_images/emoji/feet.png b/docs/_images/emoji/feet.png new file mode 100644 index 00000000..d2488ca6 Binary files /dev/null and b/docs/_images/emoji/feet.png differ diff --git a/docs/_images/emoji/page_facing_up.png b/docs/_images/emoji/page_facing_up.png new file mode 100644 index 00000000..7e1671da Binary files /dev/null and b/docs/_images/emoji/page_facing_up.png differ diff --git a/docs/_images/emoji/pill.png b/docs/_images/emoji/pill.png new file mode 100644 index 00000000..6a19f51a Binary files /dev/null and b/docs/_images/emoji/pill.png differ diff --git a/docs/_images/emoji/shell.png b/docs/_images/emoji/shell.png new file mode 100644 index 00000000..7a6d65d4 Binary files /dev/null and b/docs/_images/emoji/shell.png differ diff --git a/docs/_images/emoji/snake.png b/docs/_images/emoji/snake.png new file mode 100644 index 00000000..39b15677 Binary files /dev/null and b/docs/_images/emoji/snake.png differ diff --git a/docs/_images/emoji/truck.png b/docs/_images/emoji/truck.png new file mode 100644 index 00000000..66b68a32 Binary files /dev/null and b/docs/_images/emoji/truck.png differ diff --git a/docs/getting-started.md b/docs/getting-started.md index 54d93844..f8715648 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -21,18 +21,8 @@ Welcome to Zrb's getting started guide. We will cover everything you need to kno - [Creating a Project](#creating-a-project) - [Using `project.sh`](#using-projectsh) - [Creating a Task](#creating-a-task) - - [Scaffolding a Task](#scaffolding-a-task) - - [Updating Task definition](#updating-task-definition) -- [Understanding The Code](#understanding-the-code) - [Task Definition](#task-definition) - - [Creating a Task Using Task Classes](#creating-a-task-using-task-classes) - - [Creating a Task Using Python Decorator](#creating-a-task-using-python-decorator) - - [Task Parameters](#task-parameters) - - [Task Dependencies](#task-dependencies) - - [Task Inputs](#task-inputs) - - [Task Environments](#task-environments) - - [Switching Environment](#switching-environment) -- [Creating a Long-Running Task](#creating-a-long-running-task) +- [More Example](#more-example) This guide assumes you have some familiarity with CLI and Python. @@ -375,6 +365,15 @@ Let's see some simple task definitions and break them down. ### The Example +
+ +

+ + One small step for a man, one giant leap for mankind. + +

+
+ ```python from zrb import runner, Parallel, Task, CmdTask, python_task, Env, StrInput @@ -429,10 +428,19 @@ Finally, by invoking `runner.register(hello, hello_cmd, hello_py)`; we want the
-🖱️ Click here to see the complete explanation +👉 Click here to break down the code 👈 ### Import Statement +
+ +

+ + import antigravity. + +

+
+ ```python from zrb import runner, Parallel, Task, CmdTask, python_task, Env, StrInput ``` @@ -449,6 +457,15 @@ At the very beginning, we import some resources from `zrb` package: ### `hello-cmd` Definition +
+ +

+ + Shell Script: Every problem is a line of code away from being solved. + +

+
+ ```python hello_cmd = CmdTask( name='hello-cmd', @@ -470,6 +487,15 @@ Meanwhile, to access the value of `user-name` parameter, we can use `{{ input.us ### `hello-py` Definition +
+ +

+ + Python: The programming language, not the snake. + +

+
+ ```python @python_task( name='hello-py', @@ -510,6 +536,16 @@ mode = env_map.get('MODE') ### `hello` Definition And Its Dependencies + +
+ +

+ + Adding a new dependency is like inviting a stranger to live in your codebase. + +

+
+ ```python hello = Task(name='hello') Parallel(hello_cmd, hello_py) >> hello @@ -527,6 +563,16 @@ hello-cmd ──┘ ### Register Tasks to The `runner` +
+ +

+ + Fotokopi KTP dan biaya registrasi lima ribu rupiah. + +

+
+ + ```python runner.register(hello, hello_cmd, hello_py) ``` @@ -567,7 +613,7 @@ zrb hello Now you will see `Current mode: PROD` instead of `Current mode: DEV`. -## Use Case +# More Example Let's start with a use case: