bastianplsfix

Create the course project

Everything you write in this course lives in one workspace. I want you to be able to find any program you've written weeks from now, so we set the structure up once, properly, and never think about it again. By the end of this step you'll have:

examples/
├── deno.json
└── programs/

Two things. That's the entire project skeleton. I promised you minimal setup, and I intend to keep it that way.

1. Create the project directory

Open your terminal and run:

mkdir examples

This creates a new folder in your current working directory (typically your home folder).

2. Open the project in Zed

Launch Zed and open the folder:

Select the examples folder and choose Open. If Zed asks whether to trust the folder, select Trust; this enables the project-specific settings we'll add in the next step.

3. Add the deno.json configuration

Right-click the examples folder in the Project Panel, choose New File, and name it deno.json. Insert this configuration:

{
"imports": {
"@std/assert": "jsr:@std/assert@1"
},
"lint": {
"rules": {
"exclude": ["no-import-prefix"]
}
}
}

deno.json is the project's one configuration file, and here's what you're putting in it:

Yes, I'm asking you to configure things before you can understand them. It's the one time in this course I'll do that. Every line above gets explained on schedule.

4. Create the programs folder

Right-click examples and create a new folder called programs. Every program you write in this course goes in there.

5. Verify the configuration

Ask Deno to proofread what you typed. Open Zed's terminal (Control-`) and run:

deno fmt --check deno.json

Deno should report that the configuration file checks out. If it objects, compare your file against the block above; a missing comma or quote is the usual culprit.

Your setup check

Confirm these four conditions before proceeding:

  1. Zed has the examples folder open.
  2. The project contains deno.json with the imports and lint settings shown above.
  3. An empty programs folder exists.
  4. The format-check command runs successfully.

The skeleton is ready. One step remains before the first program: introducing your editor to your runtime.


Next: Configure this Zed project to use Deno →