Skip to content

Commit

Permalink
improve codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Jul 11, 2024
1 parent 9ef8c8d commit a635412
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions runtime/manual/basics/workspaces/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ library called `buzz` that we developed a couple years back.

We'll need to include a `deno.json` configuration file in the root:

```js
// deno.json
```js, title="deno.json"
{
"nodeModulesDir": true,
"workspace": ["fizz", "buzz"]
Expand All @@ -132,24 +131,23 @@ using `node_modules/`.

In `fizz`, our Deno-first package:

```js
// fizz/deno.json
```js, title="fizz/deno.json"
{
"name": "@deno-workspace/fizz",
"version": "0.2.0",
"exports": "./mod.ts"
}
```

// fizz/mod.ts
```js, title="fizz/mod.ts"
export function logProject(project) {
console.log(project);
}
```

And in `buzz`, our legacy Node.js package:

```js
// buzz/package.json
```js, title="buzz/package.json"
{
"name": "@deno-workspace/buzz",
"version": "0.5.0",
Expand All @@ -159,8 +157,9 @@ And in `buzz`, our legacy Node.js package:
"ts-morph": "*"
}
}
```

// buzz/index.js
```js, title="buzz/index.json"
import { Project } from "ts-morph";
import { createProject } from "@deno-workspace/fizz";
Expand Down

0 comments on commit a635412

Please sign in to comment.