Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions runtime/reference/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,46 @@ Watcher Process started.
deno serve: Listening on http://0.0.0.0:8000/
```

## Initialize an empty project

Running `deno init --empty` bootstraps an empty project with a basic console
log.

```sh
$ deno init --empty
✅ Project initialized

Run these commands to get started

# Run the program
deno run main.ts

# Run the program and watch for file changes
deno task dev
```

Your [`deno.json`](/runtime/fundamentals/configuration/) file will look like
this:

```json
{
"tasks": {
"dev": "deno run --watch main.ts"
}
}
```

Now, you can run the project, which
[watches for changes](/runtime/getting_started/command_line_interface/#watch-mode),
by running `deno task dev`.

```sh
$ deno task dev
Task dev deno run --watch main.ts
Watcher Process started.
Hello world!
```

## Generate a library project

You can append a `--lib` flag to add extra parameters to your `deno.json`, such
Expand Down