Skip to content

Commit f0f513b

Browse files
EGAMAGZdandv
andauthored
docs: updated references to deno.json(c) across documentation (#1066)
PR that complements #1062 --------- Co-authored-by: Dan Dascalescu <[email protected]>
1 parent b5c3a55 commit f0f513b

12 files changed

+214
-39
lines changed

deno.lock

+176-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/docs/about-slow-types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ to `jsr publish` or `deno publish`.
413413
When using Deno, one can supress slow type diagnostics from being surfaced in
414414
`deno lint` by adding an exclude for the `no-slow-types` rule. This can be done
415415
by specifying `--rules-exclude=no-slow-types` when running `deno lint`, or by
416-
adding the following to your `deno.json` configuration file:
416+
adding the following to your `deno.json(c)` configuration file:
417417
418418
```json
419419
{

frontend/docs/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ like the name, version, and entrypoint(s). The
8080
modules should be importable by users of your package.
8181

8282
```json
83-
// jsr.json / deno.json
83+
// jsr.json / deno.json(c)
8484
{
8585
"name": "@luca/greet",
8686
"version": "1.0.0",

frontend/docs/migrate-x-to-jsr.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ build for your platform with:
5050
deno upgrade --canary
5151
```
5252

53-
Then, from within your package folder (probably the one with your `deno.json` or
54-
`mod.ts`), execute the following command:
53+
Then, from within your package folder (probably the one with your `deno.json(c)`
54+
or `mod.ts`), execute the following command:
5555

5656
```bash
5757
deno run -Ar jsr:@deno/x-to-jsr
@@ -99,7 +99,7 @@ _Vendor dependencies_
9999

100100
You can also
101101
[vendor your dependencies](https://docs.deno.com/runtime/manual/basics/vendoring/)
102-
by adding `"vendor": true` to your `deno.json` file. This will download local
102+
by adding `"vendor": true` to your `deno.json(c)` file. This will download local
103103
versions of your HTTPS dependencies to a `vendor` directory when the project is
104104
ran.
105105

frontend/docs/native-imports.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ constraints in your code, you can use
5454
to map the `jsr:` scheme to a different prefix.
5555

5656
In **Deno** you can do this by adding a line to the `"imports"` section in your
57-
`deno.json`. You can do this manually, or by using the `deno add` command:
57+
`deno.json(c)`. You can do this manually, or by using the `deno add` command:
5858

5959
```diff
6060
{
@@ -64,7 +64,7 @@ In **Deno** you can do this by adding a line to the `"imports"` section in your
6464
}
6565
```
6666

67-
You can then import packages using the alias defined in the `deno.json`:
67+
You can then import packages using the alias defined in the `deno.json(c)`:
6868

6969
```ts
7070
import { camelCase } from "@luca/cases";

frontend/docs/npm-compatibility.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ are generated by JSR, and contain all source code reachable from the entrypoint
172172
of the package. This source code is transpiled to JavaScript, and TypeScript
173173
type declarations (`.d.ts` files) are generated for all TypeScript files. The
174174
tarball also contains a `package.json` file that contains the `exports` field
175-
from the original `jsr.json` / `deno.json` file.
175+
from the original `jsr.json` / `deno.json(c)` file.
176176

177177
Yanked versions of packages are not advertised in the package version manifest
178178
of the npm registry endpoint. Tarballs for yanked versions are still available

frontend/docs/package-configuration.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ file can instead be placed in the
99
[`deno.json`](https://docs.deno.com/runtime/manual/getting_started/configuration_file).
1010

1111
```json
12-
// jsr.json / deno.json
12+
// jsr.json / deno.json(c)
1313
{
1414
"name": "@luca/greet",
1515
"version": "1.0.0",
@@ -36,7 +36,7 @@ your package. The `exports` field can either be specified as a single string, or
3636
as an object mapping entrypoint names to paths in your package.
3737

3838
```json
39-
// jsr.json / deno.json
39+
// jsr.json / deno.json(c)
4040
{
4141
"name": "@luca/greet",
4242
"version": "1.0.0",
@@ -58,7 +58,7 @@ you only have a single entrypoint in your package. It is semantically equivalent
5858
to specifying a default entrypoint in the object form.
5959

6060
```diff
61-
// deno.json
61+
// deno.json(c)
6262
{
6363
"name": "@luca/greet",
6464
"version": "1.0.0",
@@ -72,9 +72,9 @@ to specifying a default entrypoint in the object form.
7272
### `include` and `exclude`
7373

7474
You can also use the `include` and `exclude` options to include and exclude
75-
files during publishing. When using a `deno.json`, you can use `publish.include`
76-
and `publish.exclude` to include and exclude files only for publishing, rather
77-
than for all Deno subcommands.
75+
files during publishing. When using a `deno.json(c)`, you can use
76+
`publish.include` and `publish.exclude` to include and exclude files only for
77+
publishing, rather than for all Deno subcommands.
7878
[Learn more about filtering files](/docs/publishing-packages#filtering-files).
7979

8080
## JSON Schema

frontend/docs/publishing-packages.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export * from "./greet.ts";
101101
### Importing npm packages
102102

103103
You may import npm packages specified in the `"dependencies"` of a
104-
`package.json`, ones specified in an import map or `deno.json`, or ones
104+
`package.json`, ones specified in an import map or `deno.json(c)`, or ones
105105
specified in source code using `npm:` specifiers.
106106

107107
```json
@@ -123,7 +123,7 @@ import * as express from "npm:express@4";
123123
### Importing JSR packages
124124

125125
You may import JSR packages specified in the `"dependencies"` of a
126-
`package.json`, ones specified in an import map or `deno.json`, or ones
126+
`package.json`, ones specified in an import map or `deno.json(c)`, or ones
127127
specified in source code using `jsr:` specifiers.
128128
[Learn more about using packages.](/docs/using-packages)
129129

@@ -161,13 +161,13 @@ export function readJsonFile(path: string) {
161161

162162
You may use a dependency manifest like a `package.json`, or an
163163
[import map](https://docs.deno.com/runtime/manual/basics/import_maps) (like the
164-
`deno.json` file) to simplify your imports. During publishing, `jsr publish` /
165-
`deno publish` will automatically rewrite the specifiers in your source code to
166-
fully qualified specifiers that do not require an import map / `package.json`
164+
`deno.json(c)` file) to simplify your imports. During publishing, `jsr publish`
165+
/ `deno publish` will automatically rewrite the specifiers in your source code
166+
to fully qualified specifiers that do not require an import map / `package.json`
167167
anymore.
168168

169169
```json
170-
// import_map.json / deno.json
170+
// import_map.json / deno.json(c)
171171
{
172172
"imports": {
173173
"@luca/greet": "jsr:@luca/greet@1",
@@ -201,10 +201,10 @@ consumers of your package.
201201
After you have written your code, you must add a config file to your package.
202202
This file contains package metadata like the name, version, and entrypoint(s).
203203
This file should be named `jsr.json`. Deno users can also include the required
204-
JSR properties in their `deno.json` to avoid having to create another file.
204+
JSR properties in their `deno.json(c)` to avoid having to create another file.
205205

206206
```json
207-
// jsr.json / deno.json
207+
// jsr.json / deno.json(c)
208208
{
209209
"name": "@luca/greet",
210210
"version": "1.0.0",
@@ -354,8 +354,8 @@ file. `jsr publish` will not attempt to publish if the version specified in your
354354

355355
`jsr publish` will ignore files that are listed in a `.gitignore` file in the
356356
root of your package. Additionally, you can specify the `include` and `exclude`
357-
fields in your `jsr.json` / `deno.json` file to include, ignore, or un-gitignore
358-
specific files.
357+
fields in your `jsr.json` / `deno.json(c)` file to include, ignore, or
358+
un-gitignore specific files.
359359

360360
For example, to only selectively include certain files, you can specify a glob
361361
that matches all files by using the `include` option:
@@ -398,13 +398,13 @@ You may also exclude certain files via the `exclude` option:
398398
}
399399
```
400400

401-
When using Deno, the `include` and `exclude` options in `deno.json` are used for
402-
many other Deno subcommands as well, such as `deno test`, `deno lint` and
401+
When using Deno, the `include` and `exclude` options in `deno.json(c)` are used
402+
for many other Deno subcommands as well, such as `deno test`, `deno lint` and
403403
`deno fmt`. You can use `publish.include` and `publish.exclude` in your
404-
`deno.json` file to specify options that only apply to `deno publish`.
404+
`deno.json(c)` file to specify options that only apply to `deno publish`.
405405

406406
```json
407-
// deno.json
407+
// deno.json(c)
408408
{
409409
"name": "@luca/greet",
410410
"version": "1.0.0",
@@ -431,7 +431,7 @@ be ignored when publishing.
431431
This may however be inconvenient if you want to publish the `dist/` directory,
432432
because you have `"exports"` pointing to it (or a subdirectory of it). In this
433433
case, you can un-ignore the `dist/` directory by using a negation in the
434-
`exclude` field in your `jsr.json` / `deno.json` file.
434+
`exclude` field in your `jsr.json` / `deno.json(c)` file.
435435

436436
```json
437437
// jsr.json

0 commit comments

Comments
 (0)