Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Source for Dart website

License

NotificationsYou must be signed in to change notification settings

rmacnak-google/site-www

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart The Dart language site (dart.dev)

Build Status SVGOpenSSF Scorecard SVGfirst-timers SVG

Thehttps://dart.dev site, built withJekyll and hosted onFirebase.

We welcome contributions,and we'refirst-timer friendly!

Getting started

Start by looking for anissuethat 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 pullrequest. For simple changes (such as to CSS and text), you probably don't needto 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 theactual build, pleaseedit this READMEorfile 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 usingbash,and setup might not work if you use another shell.

  • GNU Make.On Windows the easiest way to install Make ischoco install makeusing command prompt or powershell as an admin.Other options include using asubsystem.

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

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

2. Clone this repoand its submodules

Note: This repo has gitsubmodules, which affects how you clone it.The GitHub documentation has general help onforking andcloning repos.

If you're not a member of the Dart organization,we recommend youcreate 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 timeusing 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 developmentyou can use thegit 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 exclamationpoint (!), then update Docker Desktop before proceeding.

  3. Run the initial local setup command:

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

    $ make up

    The site is generated, and then the development server runs in theDocker container, with the generated_site directory visible locallyas a mirrored volume from inside the container.

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

    Note: Unless you're editing files undersite-shared,you can safely ignoreERROR: 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 scratchusing the following commands:

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

    SeePre-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 shellmake run# Check/validate example codetool/test.sh# Check links for 404 errorstool/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 apersonal Firebase hosting staging site as follows:

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

    • Navigate to theFirebase Consoleand 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 yourFIREBASE_PROJECT env var to your.env fileand it will overwrite the default every time you deploy without specifying.

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

Creating and/or editing DartPad example code

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

Refresh DartPad HTML tooltips

Files that require DartPad HTML to be manually updatedinclude 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 insrc/assets/dash/js:

$ tool/compile.sh

Dockerfile Maintenance

Dart SDK and Node PPA Checksum values

Since both the Dart SDK and Node PPAcurl remote files,it's important to verify checksum values.Both installs uselatest andlts respectively,so these files may be periodically updated.When this happens,local checksums may fail andThis 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 runmake fetch-sums

This command will output the updated checksum values for both Node and Dart,and that output will be formatted similaror 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.

About

Source for Dart website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart67.3%
  • SCSS11.8%
  • HTML10.6%
  • JavaScript4.4%
  • Shell2.8%
  • Ruby1.2%
  • Other1.9%

[8]ページ先頭

©2009-2025 Movatter.jp