Skip to main content

Tutorial Intro

Let's discover DBang in less than 5 minutes.

Getting Started​

First you should install dbang, the easy way is brew install dbangdev/tap/dbang (X86) or cargo install dbang.

Generate your repo on Github​

Create a new repo by gh - GitHub command Line:

gh repo create dbang-catalog

Write your first script​

Create hello.ts with following code:

console.log("Hello world!");

Add your scripts in dbang-catalog.json​

Create a dbang-catalog.json file with following content:

{
"scripts": {
"hello": {
"script-ref": "hello.ts",
"description": "Deno hello.ts"
}
}
}

Push your code to Github​

git commit -m "Add hello.ts" hello.ts
git commit -m "dbang-catalog.json" dbang-catalog.json
git push

Run your script by dbang​

dbang hello@yourname

Attention: Even you haven't installed Deno on your laptop, don't worry, and dbang will install latest Deno automatically and run your script.