Skip to content

Creating_Scripts

Tricked edited this page Oct 15, 2021 · 2 revisions

title: Creating Scripts description: Guide on how to create scripts for diplo

Initilize diplo in your current directory

$ diplo init

Create your first script

{
  "dependencies": {},
  "import_map": false,
  "load_env": false,
  "name": "",
  "scripts": {
    "start": "deno run mod.ts"
  },
  "watcher": {}
}

now start your script

$ diplo run start

or start your script while watching for changes

$ diplo run start --watch

Running scripts without actually making a entry

$ diplo exec <script>
$ diplo exec deno run -A mod.ts

Clone this wiki locally