Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into npm-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhinnery authored Sep 15, 2023
2 parents e47a56f + 1154135 commit 168a0d8
Show file tree
Hide file tree
Showing 63 changed files with 1,960 additions and 422 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
broken-links:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check Markdown Links
uses: ruzickap/action-my-markdown-link-checker@v1
with:
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,25 @@ on:
branches: [main]

jobs:
typos:
name: spell-check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: crate-ci/typos@master
with:
config: ./typos.toml

format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1.0.0
uses: denoland/setup-deno@v1

- name: Format
run: deno fmt --check
Expand All @@ -23,10 +34,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1.0.0
uses: denoland/setup-deno@v1

- name: Type-check Deno manual
run: deno test --doc --unstable --import-map=.github/import_map.json --no-check=remote
4 changes: 2 additions & 2 deletions .github/workflows/suggest-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1.0.0
uses: denoland/setup-deno@v1

- name: Format
run: deno fmt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-algolia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1.0.0
uses: denoland/setup-deno@v1

- name: Update Algolia
working-directory: ./.tools
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
.env
.vscode
33 changes: 6 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
# Deno Manual
# (DEPRECATED) Deno Manual

This repository is the official documentation for Deno, and it's available at:
https://deno.land/manual
This repository was formerly the home of the Deno manual, running at
deno.land/manual. The instructions below describe how to run the doc site and
preview changes.

## Contributing

1. Clone this project and `dotland` in the same parent folder:

```
git clone https://github.com/denoland/manual.git
git clone https://github.com/denoland/dotland.git
```

2. Move into the `dotland` folder, and run the following command to start the
local `deno.land` website with the local manual contents:

```
cd dotland
MANUAL_PATH=../manual deno task start
```

When opening a PR, make sure the code is formatted correctly. To format the
code:

1. Install Deno (https://deno.land/#installation)
2. Run `deno fmt` at the root of this repository

Before creating new pages, open an issue and discuss the proposed changes.
**New contributions should be made to
[docs.deno.com](https://github.com/denoland/deno-docs)**
2 changes: 1 addition & 1 deletion advanced/continuous_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1.1.1
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x # Run with latest stable Deno.
```
Expand Down
2 changes: 1 addition & 1 deletion advanced/jsx_dom/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Then we will stringify the modified CSS AST and output it to the console:

```ts, ignore
import * as css from "https://esm.sh/[email protected]";
import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
import { assert } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
declare global {
interface AbortSignal {
Expand Down
3 changes: 1 addition & 2 deletions advanced/jsx_dom/deno_dom.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Using deno-dom with Deno

[deno-dom](https://deno.land/x/deno_dom) is an implementation of DOM and HTML

parser in Deno. It is implemented in Rust (via Wasm) and TypeScript. There is
also a "native" implementation, leveraging the FFI interface.

Expand All @@ -21,7 +20,7 @@ first heading it encounters and print out the text content of that heading:

```ts
import { DOMParser } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";
import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
import { assert } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";

const document = new DOMParser().parseFromString(
`<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion advanced/jsx_dom/jsdom.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ first heading it encounters and print out the text content of that heading:

```ts, ignore
import { JSDOM } from "jsdom";
import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
import { assert } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
const { window: { document } } = new JSDOM(
`<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion advanced/jsx_dom/linkedom.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ first heading it encounters and print out the text content of that heading:

```ts
import { DOMParser } from "https://esm.sh/linkedom";
import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
import { assert } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";

const document = new DOMParser().parseFromString(
`<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion advanced/language_server/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ with Deno:
}
```

- `deno/task` - Requests the return of avalaible deno tasks, see
- `deno/task` - Requests the return of available deno tasks, see
[task_runner](../../tools/task_runner.md).

It does not expect any parameters.
Expand Down
9 changes: 8 additions & 1 deletion advanced/typescript.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Using TypeScript

In this chapter we will discuss:
Deno not only supports TypeScript out of the box, but also treats TypeScript as
a first class language. This means the developer experience when authoring and
importing TypeScript will be as easy and straightforward as that of JavaScript.

You can run or import TypeScript without installing anything more than the Deno
CLI.

In this chapter, we'll discuss:

- [Overview of TypeScript in Deno](./typescript/overview.md)
- [Configuring TypeScript in Deno](./typescript/configuration.md)
Expand Down
2 changes: 1 addition & 1 deletion basics/connecting_to_databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ console.log(`Started on http://localhost:3000`);
To make GraphQL client calls in Deno, import the
[graphql npm module](https://www.npmjs.com/package/graphql) with the
[esm CDN](https://esm.sh/). To learn more about using npm modules in Deno via
CDN read [here](../node/cdns.md)
CDN read [here](../node/cdns.md).

#### Make GraphQL client calls with the graphql npm module

Expand Down
4 changes: 2 additions & 2 deletions basics/import_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ written something similar in our `deno.json` configuration file:

## Example - Using deno_std's fmt module via `fmt/`

**import_map.json**
**deno.json**

```json
{
Expand All @@ -62,7 +62,7 @@ console.log(red("hello world"));

To use your project root for absolute imports:

**import_map.json**
**deno.json**

```jsonc
{
Expand Down
4 changes: 2 additions & 2 deletions basics/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The solution is to import and re-export your external libraries in a central
`deps.ts` file (which serves the same purpose as Node's `package.json` file).
For example, let's say you were using the above assertion library across a large
project. Rather than importing
`"https://deno.land/std@$STD_VERSION/testing/asserts.ts"` everywhere, you could
`"https://deno.land/std@$STD_VERSION/assert/mod.ts"` everywhere, you could
create a `deps.ts` file that exports the third-party code:

**deps.ts**
Expand All @@ -146,7 +146,7 @@ export {
assert,
assertEquals,
assertStringIncludes,
} from "https://deno.land/std@$STD_VERSION/testing/asserts.ts";
} from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
```

And throughout the same project, you can import from the `deps.ts` and avoid
Expand Down
22 changes: 11 additions & 11 deletions basics/modules/private.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Private Modules and Repositories

There maybe instances where you want to load a remote module that is located in
There may be instances where you want to load a remote module that is located in
a _private_ repository, like a private repository on GitHub.

Deno supports sending bearer tokens when requesting a remote module. Bearer
tokens are the predominant type of access token used with OAuth 2.0 and is
broadly supported by hosting services (e.g. GitHub, Gitlab, BitBucket,
tokens are the predominant type of access token used with OAuth 2.0, and are
broadly supported by hosting services (e.g., GitHub, GitLab, Bitbucket,
Cloudsmith, etc.).

## DENO_AUTH_TOKENS

The Deno CLI will look for an environment variable named `DENO_AUTH_TOKENS` to
determine what authentication tokens it should consider using when requesting
remote modules. The value of the environment variable is in the format of a _n_
number of tokens deliminated by a semi-colon (`;`) where each token is either:
remote modules. The value of the environment variable is in the format of _n_
number of tokens delimited by a semi-colon (`;`) where each token is either:

- a bearer token in the format of `{token}@{hostname[:port]}`
- a bearer token in the format of `{token}@{hostname[:port]}` or

- basic auth data in the format of `{username}:{password}@{hostname[:port]}`

For example a single token for would look something like this:
For example, a single token for `deno.land` would look something like this:

```sh
[email protected]
```

or
or:

```sh
DENO_AUTH_TOKENS=username:[email protected]
Expand All @@ -46,9 +46,9 @@ modules on the server.

## GitHub

To be able to access private repositories on GitHub, you would need to issue
yourself a _personal access token_. You do this by logging into GitHub and going
under _Settings -> Developer settings -> Personal access tokens_:
To access private repositories on GitHub, you would need to issue yourself a
_personal access token_. You do this by logging into GitHub and going under
_Settings -> Developer settings -> Personal access tokens_:

![Personal access tokens settings on GitHub](../../images/private-pat.png)

Expand Down
Loading

0 comments on commit 168a0d8

Please sign in to comment.