• Stars
    star
    944
  • Rank 48,415 (Top 1.0 %)
  • Language
    Dart
  • License
    Other
  • Created over 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Source for Dart website

Dart The Dart language site (dart.dev)

Build Status SVG OpenSSF Scorecard SVG first-timers SVG

The https://dart.dev site, built with Jekyll and hosted on Firebase.

We welcome contributions, and we're first-timer friendly!

Getting started

Start by looking for an issue that catches your interest, or create an issue with your proposed change. Ask for the issue to be assigned to you.

To update this site, fork the repo, make your changes, and generate a pull request. For simple changes (such as to CSS and text), you probably don't need to build this site. Often you can make changes using the GitHub UI.

NOTE: If you clone this repo locally, see the instructions below on cloning with its submodule.

If your change involves code samples, adds/removes pages, or affects navigation, you'll need to build and test your work before submitting.

If you want or need to build, follow the steps below.

Help us improve these instructions! If you have any problems getting set up to build or performing the actual build, please edit this README or file an issue (or both).

Before you build this site

For changes beyond simple text and CSS tweaks, we recommend building the site.

1. Get the prerequisites

Install the following tools, if you don't have them already:

  • bash, the Bourne shell. These instructions assume you're using bash, and setup might not work if you use another shell.

  • GNU Make. On Windows the easiest way to install Make is choco install make using command prompt or powershell as an admin. Other options include using a subsystem.

  • Docker. We use Docker for local dev, tests, and building the site. Install it from https://docs.docker.com/get-docker/.

  • Firebase CLI, for hosting the site locally. One way to get this is to run npm install -g firebase-tools. For full setup details, read the Firebase CLI documentation.

2. Clone this repo and its submodules

Note: This repo has git submodules, which affects how you clone it. The GitHub documentation has general help on forking and cloning repos.

If you're not a member of the Dart organization, we recommend you create a fork of this repo under your own account, and then submit a PR from that fork.

Once you have a fork (or you're a Dart org member), choose one of the following submodule-cloning techniques:

  • Clone the repo and its submodule at the same time using the --recurse-submodules option:

    $ git clone --recurse-submodules https://github.com/dart-lang/site-www.git

    OR

  • If you've already cloned the repo without its submodule, then run this command from the repo root:

    $ git submodule update --init --recursive

Note: At any time during development you can use the git submodule command to refresh submodules:

$ git pull; git submodule update --init --recursive

Setting up your local environment and serve changes

  1. Optional: After cloning the repo and its submodules, create a branch for your changes:

    $ git checkout -b <BRANCH_NAME>
  2. If the Docker Desktop application isn't already running on your machine, start it. Look for the Docker status icon: if it has an exclamation point (!), then update Docker Desktop before proceeding.

  3. Run the initial local setup command:

    $ make setup
  4. Serve the site locally (via docker-compose):

    $ make up

    The site is generated, and then the development server runs in the Docker container, with the generated _site directory visible locally as a mirrored volume from inside the container.

  5. View your changes in the browser by navigating to http://localhost:4000.

    Note: Unless you're editing files under site-shared, you can safely ignore ERROR: directory is already being watched messages. For details, see #1363.

  6. Make your changes to the local repo.

    The site will rebuild and the browser will autoreload to reflect the changes.

    Tip: If you aren't seeing the changes you expect (e.g. src/_data), ctrl-C out of your running dev server and rebuild the site from scratch using the following commands:

    $ make down && make clean && make up
  7. Commit your changes to the branch and submit your PR.

    See Pre-push site checks

  8. When you've finished developing, shut down the Docker container:

    $ make down

Tip: To find additional commands, read the Makefile. For example, if you need to debug the Docker setup, you can run:

$ make run

Pre-push site checks

Checking documentation and example code

If you've made changes to this site's documentation and/or example code, and committed locally, then run the following command before pushing your work:

# Enter a running Docker container shell
make run

# Check/validate example code
tool/test.sh

# Check links for 404 errors
tool/check-links.sh

If these scripts report errors or warnings, then address those issues and rerun the above commands. Otherwise, you can push your changes.

Deploying to a staging site

You can deploy your local edits to a personal Firebase hosting staging site as follows:

  1. If you don't already have a Firebase project,

    • Navigate to the Firebase Console and create your own Firebase project (for example, dart-dev-staging).

    • Head back to your local repo shell and verify that you are logged in.

      $ firebase login
    • Ensure that your project exists and activate that project:

      $ firebase projects:list
      $ firebase use <your-project>
  2. Build the site via Docker:

    $ make build

    This will build 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:

    $ FIREBASE_PROJECT=<your-project> make deploy

    TIP: Add your FIREBASE_PROJECT env var to your .env file and it will overwrite the default every time you deploy without specifying.

  4. Navigate to your PR on GitHub and update it with the location of the staged version, the names of your reviewers, and so on.

Creating and/or editing DartPad example code

Most of the code used to create DartPad examples is hosted on GitHub. However, this repo also contains some *.dart files responsible for DartPad example code.

Refresh DartPad HTML tooltips

Files that require DartPad HTML to be manually updated include instructions at the top that specify running:

$ tool/create_code_with_tooltips.dart

Follow the instructions in those files to refresh the appropriate code.

DartPad picker

The DartPad example picker must be manually compiled if changes are made. This will regenerate the associated JavaScript file in src/assets/dash/js:

$ tool/compile.sh

Dockerfile Maintenance

Dart SDK and Node PPA Checksum values

Since both the Dart SDK and Node PPA curl remote files, it's important to verify checksum values. Both installs use latest and lts respectively, so these files may be periodically updated. When this happens, local checksums may fail and This will break the Docker/Compose setup/build. You will see the relevant output in your shell e.g. DART CHECKSUM FAILED!.... When this happens, run the following command:

make fetch-sums

This command will output the updated checksum values for both Node and Dart, and that output will be formatted similar or the same as what is currently in the Dockerfile. Copy this output and replace the relevant install code in the Dockerfile, then rerun your setup/build again.

More Repositories

1

sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
Dart
10,110
star
2

language

Design of the Dart language
TeX
2,652
star
3

dart-pad

An online Dart editor with support for console, web, and Flutter apps
Dart
1,702
star
4

pub

The pub command line tool
Dart
1,040
star
5

http

A composable API for making HTTP requests in Dart.
Dart
1,021
star
6

shelf

Web server middleware for Dart
Dart
920
star
7

build

A build system for Dart written in Dart
Dart
785
star
8

pub-dev

The pub.dev website
Dart
785
star
9

dart_style

An opinionated formatter/linter for Dart code
Dart
645
star
10

dart-vim-plugin

Syntax highlighting for Dart in Vim
Vim Script
637
star
11

mockito

Mockito-inspired mock library for Dart
Dart
632
star
12

linter

Linter for Dart.
Dart
628
star
13

samples

A collection of Dart code samples by Dart DevRel
Dart
602
star
14

test

A library for writing unit tests in Dart.
Dart
492
star
15

source_gen

Automatic source code generation for Dart
Dart
484
star
16

dartdoc

API documentation tool for Dart.
Dart
473
star
17

markdown

A Dart markdown library
Dart
444
star
18

code_builder

A fluent API for generating valid Dart source code
Dart
428
star
19

web_socket_channel

StreamChannel wrappers for WebSockets.
Dart
418
star
20

leak_tracker

A framework for memory leak tracking for Dart and Flutter applications.
Dart
387
star
21

collection

The collection package for Dart contains a number of separate libraries with utility functions and classes that makes working with collections easier.
Dart
375
star
22

ffigen

FFI binding generator
Dart
364
star
23

logging

A Dart package for debug and error logging.
Dart
332
star
24

async

A Dart package that contains tools to work with asynchronous computations.
Dart
320
star
25

wasm

Utilities for loading and running WASM modules from Dart code
Dart
309
star
26

html

Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server.
Dart
276
star
27

crypto

A set of cryptographic functions implemented in pure Dart.
Dart
275
star
28

path

A string-based path manipulation library.
Dart
223
star
29

args

A command-line argument parsing library for Dart.
Dart
214
star
30

webdev

A CLI for Dart web development.
Dart
212
star
31

oauth2

An OAuth2 client library for Dart.
Dart
211
star
32

pana

Package ANAlysis for Dart
Dart
205
star
33

setup-dart

A GitHub Action to install and setup a Dart SDK.
Dart
188
star
34

yaml

A Dart YAML parser.
Dart
169
star
35

jnigen

Experimental bindings generator for Java bindings through dart:ffi and JNI.
Dart
154
star
36

homebrew-dart

Dart team's official tap for homebrew.
Ruby
153
star
37

native

Dart packages related to FFI and native assets bundling.
Dart
153
star
38

http2

A HTTP/2 implementation for dart.
Dart
153
star
39

sample-pop_pop_win

"Pop, Pop, Win!" is an implementation of Minesweeper in Dart.
Dart
149
star
40

usage

A Google Analytics wrapper for command-line, web, and Flutter apps.
Dart
143
star
41

watcher

A file system watcher library for Dart.
Dart
138
star
42

mime

Dart package for working with MIME type definitions and for processing streams of MIME multipart media types.
Dart
132
star
43

stack_trace

A package for manipulating stack traces and printing them readably.
Dart
128
star
44

web

Lightweight browser API bindings built around JS static interop.
Dart
128
star
45

gcloud

High-level interfaces to Google Cloud Platform APIs
Dart
126
star
46

platform

A generic platform abstraction for Dart
Dart
125
star
47

stream_transform

Dart utility methods to create StreamTransfomer instances to manipulate Streams
Dart
123
star
48

lints

Official Dart lint rules; the core and recommended set of lints suggested by the Dart team.
Dart
116
star
49

coverage

Dart coverage data manipulation and formatting
Dart
103
star
50

sse

Dart Server Sent Events package
Dart
96
star
51

csslib

A library for parsing CSS.
Dart
95
star
52

benchmark_harness

The official benchmark harness for Dart
Dart
94
star
53

appengine

Dart support for App Engine managed VMs
Dart
93
star
54

fake_async

Fake asynchronous events for deterministic testing.
Dart
90
star
55

convert

Conversion utilities
Dart
72
star
56

matcher

A declarative API for specifying expectations.
Dart
71
star
57

json_rpc_2

A Dart implementation of the JSON-RPC 2.0 spec.
Dart
71
star
58

characters

A package for characters represented as unicode extended grapheme clusters
Dart
69
star
59

dart-docker

Docker images for the Dart programming language (https://dart.dev)
Dart
68
star
60

pub_semver

A package for working with Pub/semver-style versions and version constraints
Dart
65
star
61

i18n

A general mono-repo for Dart i18n and l10n packages.
Dart
63
star
62

cli_util

A library to help in building Dart command-line apps
Dart
60
star
63

string_scanner

A class for parsing strings using a sequence of patterns.
Dart
60
star
64

glob

Bash-style filename globbing for Dart.
Dart
56
star
65

pubspec_parse

Simple package for parsing pubspec.yaml files with a type-safe API and rich error reporting
Dart
51
star
66

pool

A class for managing a finite pool of resources.
Dart
51
star
67

stream_channel

An abstraction for two-way communication channels.
Dart
50
star
68

io

Utilities for the Dart VM's dart:io.
Dart
49
star
69

macros

A Dart mono-repo for macro development.
Dart
48
star
70

fixnum

Fixed-width integer library for Dart.
Dart
45
star
71

clock

A fakeable wrapper for dart:core clock APIs.
Dart
41
star
72

ecosystem

This repository is home to general Dart Ecosystem tools and packages.
Dart
41
star
73

http_parser

A platform-independent Dart package for parsing and serializing HTTP formats.
Dart
39
star
74

site-shared

Content shared across Dart websites
JavaScript
38
star
75

co19

A Dart language and library conformance test suite
Dart
37
star
76

typed_data

Utility functions and classes that makes working with typed data lists easier in Dart
Dart
34
star
77

source_span

A library for identifying source spans and locations.
Dart
29
star
78

tools

This repository is home to tooling related Dart packages.
Dart
29
star
79

http_multi_server

A dart:io HttpServer wrapper that handles requests from multiple servers.
Dart
28
star
80

yaml_edit

A library for YAML manipulation with comment and whitespace preservation.
Dart
27
star
81

native_synchronization

Low-level synchronization primitives built using dart:ffi.
Dart
26
star
82

os_detect

Dart multi-platform operating system identification
Dart
24
star
83

dartbug.com

The redirect service for Dart issues and bugs.
Dart
23
star
84

bazel_worker

Dart integration for Bazel build system
Dart
23
star
85

boolean_selector

A flexible syntax for boolean expressions.
Dart
23
star
86

dart-syntax-highlight

Tools and documentation for how Dart code is formatted
Dart
22
star
87

api.dart.dev

Dart API docs
Python
19
star
88

grpc_cronet

Flutter dart:grpc implementation that uses the Cronet native library.
Dart
18
star
89

dart_ci

Tools used by Dart's continuous integration (CI) testing that aren't needed by Dart SDK contributors. Mirrored from dart.googlesource.com/dart_ci. Do not land pull requests on Github.
Dart
18
star
90

source_maps

A package to programmatically manipulate source maps.
Dart
16
star
91

term_glyph

Useful glyphs and Windows-safe equivalents
Dart
16
star
92

package_config

Support for working with Package Resolution Configuration files
Dart
16
star
93

test_process

A Dart package for testing subprocesses
Dart
16
star
94

browser_launcher

Provides a standardized way to launch web browsers.
Dart
16
star
95

timing

A Dart package for tracking time spent in child operations
Dart
14
star
96

root_certificates

The set of root certificates trusted by dart:io's default SecurityContext. Taken from Mozilla's NSS library.
C++
11
star
97

test_descriptor

Provides a convenient, easy-to-read API for defining and verifying directory structures in tests
Dart
10
star
98

dartlang_project_templates

Project templates for new repos under the dart-lang organization
Dart
8
star
99

source_map_stack_trace

Convert stack traces generated by dart2js-compiled code into readable native Dart stack traces
Dart
8
star
100

.github

GitHub default community health file for dart-lang repos
7
star