From 1010c0b1345356a44d7267a25a228f9534678d3c Mon Sep 17 00:00:00 2001 From: Antony Jones Date: Wed, 10 Jun 2020 13:47:31 +0100 Subject: [PATCH] Remove duplicate site build instructions (#4824) --- README.md | 8 +------- site/README.md | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e2e4fcd532..33faec0588 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,7 @@ npm run test -- -g transition ## svelte.dev -The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.dev). To develop locally: - -```bash -cd site -npm install && npm run update -npm run dev -``` +The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.dev). ### Is svelte.dev down? diff --git a/site/README.md b/site/README.md index 259e956003..64ae22f9a8 100644 --- a/site/README.md +++ b/site/README.md @@ -1,24 +1,33 @@ ## Running locally -Set up the project: +Set up the site sub-project: ```bash git clone https://github.com/sveltejs/svelte.git -cd svelte -npm ci -PUBLISH=1 npm run build cd site npm ci npm run update +npm run dev ``` -Start the server with `npm run dev`, and navigate to [localhost:3000](http://localhost:3000). +and navigate to [localhost:3000](http://localhost:3000). -## Using a local copy of Svelte +## Running using the local copy of Svelte By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. When running the site locally, you can also use your local copy of Svelte. -To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string. +To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string: + +```bash +git clone https://github.com/sveltejs/svelte.git +cd svelte +npm ci +PUBLISH=1 npm run build +cd site +npm ci +npm run update +npm run dev +``` Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). Please note that the local REPL only works with `npm run dev` and not when building the site for production usage. @@ -35,6 +44,7 @@ In order for the REPL's GitHub integration to work properly when running locally GITHUB_CLIENT_SECRET=[your app's Client Secret] BASEURL=http://localhost:3000 ``` + ## Building the site To build the website, run `npm run sapper`. The output can be found in `__sapper__/build`.