Skip to content

Commit

Permalink
Merge branch 'main' into comment-on-limit-concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryaBelanger authored Nov 7, 2024
2 parents beed89f + 9bbda4d commit c0c61bc
Show file tree
Hide file tree
Showing 15 changed files with 504 additions and 254 deletions.
51 changes: 51 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.nodejs_22
pkgs.pnpm
];

# Sets environment variables in the workspace
env = {};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
"Dart-Code.flutter"
"Dart-Code.dart-code"
];

# Enable previews
previews = {
enable = true;
previews = {
web = {
command = ["./dash_site" "serve"];
manager = "web";
env = {
# Environment variables to set for your server
PORT = "$PORT";
};
};
};
};

# Workspace lifecycle hooks
workspace = {
# Runs when a workspace is first created
onCreate = {
get-submodule = "git submodule update --init --recursive";
pnpm-install = "pnpm install";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
};
};
};
}
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
[![Build Status SVG][]][Repo on GitHub Actions]
[![OpenSSF Scorecard SVG][]][Scorecard Results]

<a href="https://idx.google.com/import?url=https%3A%2F%2Fgithub.com%2Fdart-lang%2Fsite-www">
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="https://cdn.idx.dev/btn/open_dark_32.svg">
<source
media="(prefers-color-scheme: light)"
srcset="https://cdn.idx.dev/btn/open_light_32.svg">
<img
height="32"
alt="Open in IDX"
src="https://cdn.idx.dev/btn/open_purple_32.svg">
</picture>
</a>

The documentation site for the [Dart programming language](https://dart.dev),
built with [Eleventy][] and hosted on [Firebase][].

Expand Down Expand Up @@ -69,7 +84,7 @@ If you prefer, you can use a version manager such as [nvm][],
and run `nvm install` from the repository's root directory.

If you already have Node installed, verify it's available on your path
and already the latest stable version _(currently `20.12` or later)_:
and already the latest stable version _(currently `20.14` or later)_:

```terminal
node --version
Expand Down Expand Up @@ -143,7 +158,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
If you already have `pnpm`, verify you have the latest stable version.
We recommend using [`corepack`][] to install and manage `pnpm` versions,
since it is bundled with most installations of Node.

If you haven't used `corepack` before, you'll need to
first enable it with `corepack enable`.
Then, to install the correct `pnpm` version, from the
Expand Down Expand Up @@ -181,7 +196,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
7. View your changes in the browser by navigating to <http://localhost:4000>.

Note the port might be different if `4000` is taken.

If you want to check the raw, generated HTML output and structure,
view the `_site` directory in a file explorer or an IDE.

Expand Down Expand Up @@ -274,7 +289,7 @@ you can build a full version and upload it to Firebase.
./dash_site build
```

This will build the site and copy it to your local `_site` directory.
This builds the site and copy it to your local `_site` directory.
If that directory previously existed, it will be replaced.

3. Deploy to your activated Firebase project's default hosting site:
Expand Down
4 changes: 2 additions & 2 deletions dash_site
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

REQUIRED_DART_VERSION="3.5"
REQUIRED_NODE_VERSION="20.12"
REQUIRED_PNPM_VERSION="9.1"
REQUIRED_NODE_VERSION="20.14"
REQUIRED_PNPM_VERSION="9.4"

# Check that the 'dart' command is available on the user's path.
if ! command -v dart &> /dev/null; then
Expand Down
11 changes: 11 additions & 0 deletions examples/misc/lib/language_tour/built_in_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ void miscDeclAnalyzedButNotTested() {
// #enddocregion const-num
}

// Uncomment when feature is stable:
// {
// // #docregion digit-separators
// var n1 = 1_000_000;
// var n2 = 0.000_000_000_01;
// var n3 = 0x00_14_22_01_23_45; // MAC address
// var n4 = 555_123_4567; // US Phone number
// var n5 = 100__000_000__000_000; // one hundred million million!
// // #enddocregion digit-separators
// }

{
// #docregion quoting
var s1 = 'Single quotes work well for string literals.';
Expand Down
76 changes: 76 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,82 @@
{ "source": "/install/**", "destination": "/get-dart", "type": 301 },
{ "source": "/install/archive", "destination": "/get-dart/archive", "type": 301 },
{ "source": "/jobs", "destination": "https://docs.flutter.dev/jobs", "type": 301 },

{ "source": "/keyword", "destination": "/language/keywords", "type": 301 },
{ "source": "/keyword/abstract", "destination": "/language/class-modifiers#abstract", "type": 301 },
{ "source": "/keyword/as", "destination": "/language/operators#type-test-operators", "type": 301 },
{ "source": "/keyword/assert", "destination": "/language/error-handling#assert", "type": 301 },
{ "source": "/keyword/async", "destination": "/language/async", "type": 301 },
{ "source": "/keyword/async-star", "destination": "/language/functions#generators", "type": 301 },
{ "source": "/keyword/await", "destination": "/language/async", "type": 301 },
{ "source": "/keyword/base", "destination": "/language/class-modifiers#base", "type": 301 },
{ "source": "/keyword/break", "destination": "/language/loops#break-and-continue", "type": 301 },
{ "source": "/keyword/case", "destination": "/language/branches#switch", "type": 301 },
{ "source": "/keyword/catch", "destination": "/language/error-handling#catch", "type": 301 },
{ "source": "/keyword/class", "destination": "/language/classes#instance-variables", "type": 301 },
{ "source": "/keyword/const", "destination": "/language/variables#final-and-const", "type": 301 },
{ "source": "/keyword/continue", "destination": "/language/loops#break-and-continue", "type": 301 },
{ "source": "/keyword/covariant", "destination": "/guides/language/sound-problems#the-covariant-keyword", "type": 301 },
{ "source": "/keyword/default", "destination": "/language/branches#switch", "type": 301 },
{ "source": "/keyword/deferred", "destination": "/language/libraries#lazily-loading-a-library", "type": 301 },
{ "source": "/keyword/do", "destination": "/language/loops#while-and-do-while", "type": 301 },
{ "source": "/keyword/dynamic", "destination": "/effective-dart/design#avoid-using-dynamic-unless-you-want-to-disable-static-checking", "type": 301 },
{ "source": "/keyword/else", "destination": "/language/branches#if", "type": 301 },
{ "source": "/keyword/enum", "destination": "/language/enums", "type": 301 },
{ "source": "/keyword/export", "destination": "/guides/libraries/create-packages", "type": 301 },
{ "source": "/keyword/extends", "destination": "/language/extend", "type": 301 },
{ "source": "/keyword/extension", "destination": "/language/extension-methods", "type": 301 },
{ "source": "/keyword/extension-type", "destination": "/language/extension-types", "type": 301 },
{ "source": "/keyword/external", "destination": "/language/functions#external", "type": 301 },
{ "source": "/keyword/factory", "destination": "/language/constructors#factory-constructors", "type": 301 },
{ "source": "/keyword/false", "destination": "/language/built-in-types#booleans", "type": 301 },
{ "source": "/keyword/final", "destination": "/language/variables#final-and-const", "type": 301 },
{ "source": "/keyword/final-var", "destination": "/language/variables#final-and-const", "type": 301 },
{ "source": "/keyword/final-class", "destination": "/language/class-modifiers#final", "type": 301 },
{ "source": "/keyword/finally", "destination": "/language/error-handling#finally", "type": 301 },
{ "source": "/keyword/for", "destination": "/language/loops#for-loops", "type": 301 },
{ "source": "/keyword/Function", "destination": "/language/functions", "type": 301 },
{ "source": "/keyword/get", "destination": "/language/methods#getters-and-setters", "type": 301 },
{ "source": "/keyword/hide", "destination": "/language/libraries#importing-only-part-of-a-library", "type": 301 },
{ "source": "/keyword/if", "destination": "/language/branches#if", "type": 301 },
{ "source": "/keyword/implements", "destination": "/language/classes#implicit-interfaces", "type": 301 },
{ "source": "/keyword/import", "destination": "/language/libraries#using-libraries", "type": 301 },
{ "source": "/keyword/in", "destination": "/language/loops#for-loops", "type": 301 },
{ "source": "/keyword/interface", "destination": "/language/class-modifiers#interface", "type": 301 },
{ "source": "/keyword/is", "destination": "/language/operators#type-test-operators", "type": 301 },
{ "source": "/keyword/late", "destination": "/language/variables#late-variables", "type": 301 },
{ "source": "/keyword/library", "destination": "/language/libraries", "type": 301 },
{ "source": "/keyword/mixin", "destination": "/language/mixins", "type": 301 },
{ "source": "/keyword/new", "destination": "/language/classes#using-constructors", "type": 301 },
{ "source": "/keyword/null", "destination": "/language/variables#default-value", "type": 301 },
{ "source": "/keyword/of", "destination": "/guides/libraries/create-packages#organizing-a-package", "type": 301 },
{ "source": "/keyword/on", "destination": "/language/error-handling#catch", "type": 301 },
{ "source": "/keyword/operator", "destination": "/language/methods#operators", "type": 301 },
{ "source": "/keyword/part", "destination": "/guides/libraries/create-packages#organizing-a-package", "type": 301 },
{ "source": "/keyword/required", "destination": "/language/functions#named-parameters", "type": 301 },
{ "source": "/keyword/rethrow", "destination": "/language/error-handling#catch", "type": 301 },
{ "source": "/keyword/return", "destination": "/language/functions#return-values", "type": 301 },
{ "source": "/keyword/sealed", "destination": "/language/class-modifiers#sealed", "type": 301 },
{ "source": "/keyword/set", "destination": "/language/methods#getters-and-setters", "type": 301 },
{ "source": "/keyword/show", "destination": "/language/libraries#importing-only-part-of-a-library", "type": 301 },
{ "source": "/keyword/static", "destination": "/language/classes#class-variables-and-methods", "type": 301 },
{ "source": "/keyword/super", "destination": "/language/extend", "type": 301 },
{ "source": "/keyword/switch", "destination": "/language/branches#switch", "type": 301 },
{ "source": "/keyword/sync{,-star}", "destination": "/language/functions#generators", "type": 301 },
{ "source": "/keyword/this", "destination": "/language/constructors", "type": 301 },
{ "source": "/keyword/throw", "destination": "/language/error-handling#throw", "type": 301 },
{ "source": "/keyword/true", "destination": "/language/built-in-types#booleans", "type": 301 },
{ "source": "/keyword/try", "destination": "/language/error-handling#catch", "type": 301 },
{ "source": "/keyword/type", "destination": "/language/extension-types", "type": 301 },
{ "source": "/keyword/typedef", "destination": "/language/typedefs", "type": 301 },
{ "source": "/keyword/var", "destination": "/language/variables", "type": 301 },
{ "source": "/keyword/void", "destination": "/language/built-in-types", "type": 301 },
{ "source": "/keyword/when", "destination": "/language/branches#when", "type": 301 },
{ "source": "/keyword/with", "destination": "/language/mixins", "type": 301 },
{ "source": "/keyword/while", "destination": "/language/loops#while-and-do-while", "type": 301 },
{ "source": "/keyword/yield", "destination": "/language/functions#generators", "type": 301 },
{ "source": "/keyword/:page*", "destination": "/language/keywords", "type": 301 },

{ "source": "/language-tour", "destination": "/language", "type": 301 },
{ "source": "/language/basics", "destination": "/language", "type": 301 },
{ "source": "/language/callable-classes", "destination": "/language/callable-objects", "type": 301 },
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,27 @@
"build-site-for-production": "PRODUCTION=true OPTIMIZE=true eleventy"
},
"engines": {
"node": ">=20.12.0",
"pnpm": ">=9.1.0"
"node": ">=20.14.0",
"pnpm": ">=9.4.0"
},
"packageManager": "pnpm@9.10.0",
"packageManager": "pnpm@9.12.3",
"dependencies": {
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
"@11ty/eleventy": "3.0.0",
"firebase-tools": "^13.23.1",
"@11ty/eleventy": "^3.0.0",
"firebase-tools": "^13.24.1",
"hast-util-from-html": "^2.0.3",
"hast-util-select": "^6.0.3",
"hast-util-to-text": "^4.0.2",
"html-minifier-terser": "^7.2.0",
"js-yaml": "^4.1.0",
"liquidjs": "^10.18.0",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.2.0",
"markdown-it-attrs": "^4.2.0",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"sass": "^1.80.5",
"sass": "^1.80.6",
"shiki": "^1.22.2"
}
}
Loading

0 comments on commit c0c61bc

Please sign in to comment.