From 99155353898ea1ddbbfa6abdaf23388b46003a18 Mon Sep 17 00:00:00 2001 From: Jon Tippens Date: Fri, 12 Apr 2019 11:43:47 -0700 Subject: [PATCH 1/3] Removed formatting typo. --- src/docs/development/ui/animations/hero-animations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/development/ui/animations/hero-animations.md b/src/docs/development/ui/animations/hero-animations.md index d5de6c1e02d..b9fb3725adb 100644 --- a/src/docs/development/ui/animations/hero-animations.md +++ b/src/docs/development/ui/animations/hero-animations.md @@ -603,7 +603,7 @@ class RadialExpansion extends StatelessWidget { final Widget child; @override - Widget build(BuildContext context) {[[/highlight]] + Widget build(BuildContext context) return [[highlight]]ClipOval([[/highlight]] child: [[highlight]]Center([[/highlight]] child: [[highlight]]SizedBox([[/highlight]] From ac86633bdbc5c5551c7ca290b1394806d197fd44 Mon Sep 17 00:00:00 2001 From: Jon Tippens Date: Fri, 12 Apr 2019 13:08:38 -0700 Subject: [PATCH 2/3] Added npm scripts for cleaning and running locally. --- README.md | 26 ++++++++++++++++++-------- package.json | 4 ++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 71f5d01bbf8..0e8a5bea9c7 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ if you already have the required packages installed. 1. Create a branch. 1. Make your changes. 1. Test your changes by serving the site locally. Run either **one** of these commands: - - `./tool/serve.sh` + - `./tool/serve.sh` (can also run via `npm run clean`) or - `bundle exec jekyll serve --incremental --watch --livereload --port 4002` @@ -82,19 +82,29 @@ if you already have the required packages installed. **Note**: Unless you're editing files under `site-shared`, you can safely ignore `ERROR: directory is already being watched` messages. For details, see [#1363](https://github.com/flutter/website/issues/1363). + + **Note**: The first time you run either one of these commands, jekyll will + take anywhere between 10 - 20 seconds to generate static content inside + the `_sites` directory. If you try to verify the site locally but aren't + able to see the content right away, wait 20 seconds before stopping the + server or concluding that something is wrong. 1. Prior to submitting, validate site links:
`./tool/shared/check-links.sh` > TIP: Sometimes Jekyll gets confused and seems to be out-of-sync. (This might > happen, for example, when you pull from master and lots of files have moved.) -> To fix Jekyll, stop the `serve.sh` script, remove the generated site files by +> To fix Jekyll, stop the `serve.sh` script, remove the generated site files: > hand, and then restart the `serve.sh` script: -> -> ``` -> ^C -> $ rm -Rf ./_site/* ./.jekyll* -> $ ./tool/serve.sh -> ``` + +> `npm run clean` +> OR +> `rm -Rf ./_site/* ./.jekyll*` + +> Next, restart the `serve.sh` script: + +> `npm run start` +> OR +> `./tool/serve.sh` ## Deploy to a staging site diff --git a/package.json b/package.json index a2ab5009367..4b74624452e 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,10 @@ "version": "0.0.0", "private": true, "description": "www.dartlang.org", + "scripts": { + "start": "./tool/serve.sh", + "clean": "rm -Rf ./_site/* ./.jekyll*" + }, "repository": { "type": "git", "url": "https://github.com/dart-lang/site-www.git" From 015173e142f3740270c3e2eb263d340713e749a1 Mon Sep 17 00:00:00 2001 From: Jon Tippens Date: Fri, 12 Apr 2019 13:11:02 -0700 Subject: [PATCH 3/3] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e8a5bea9c7..83504762c46 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ if you already have the required packages installed. > TIP: Sometimes Jekyll gets confused and seems to be out-of-sync. (This might > happen, for example, when you pull from master and lots of files have moved.) -> To fix Jekyll, stop the `serve.sh` script, remove the generated site files: +> To fix Jekyll, stop the `serve.sh` script and remove the generated site files: > hand, and then restart the `serve.sh` script: > `npm run clean`