Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 7b23aef

Browse files
author
sw-yx
committed
slight tweak to readme
1 parent c45c694 commit 7b23aef

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ Netlify CLI plugin for local dev experience.
44

55
## What is Netlify Dev?
66

7-
Netlify Dev brings the power of Netlify's Edge Logic layer, [serverless functions](#netlify-functions) and [add-on ecosystem](#using-add-ons) to your local laptop. It runs Netlify's production routing engine in a local dev server to make all redirects, proxy rules, function routes or add-on routes available locally and injects the correct environment variables from your site environment, installed add-ons or your netlify.toml file into your build and function environment.
7+
Netlify Dev brings the power of Netlify's Edge Logic layer, [serverless functions](#netlify-functions) and [add-on ecosystem](#using-add-ons) to your local machine. It runs Netlify's production routing engine in a local dev server to make all redirects, proxy rules, function routes or add-on routes available locally and injects the correct environment variables from your site environment, installed add-ons or your netlify.toml file into your build and function environment.
88

99
It automatically detects common tools like Gatsby, Hugo, React Static, Eleventy, and more, to give a zero config setup for your local dev server and can help scaffolding new functions as you work on them.
1010

11+
## Prerequisites
12+
13+
There are just two:
14+
15+
- You should be [logged in on Netlify CLI](https://www.netlify.com/docs/cli/#authentication)
16+
- Your project should be linked to a `siteID` on Netlify (using [netlify init](https://www.netlify.com/docs/cli/#continuous-deployment) or [netlify link](https://www.netlify.com/docs/cli/#linking-and-unlinking-sites)). You can confirm this has been done if you have a `.netlify` folder with a `state.json` file containing your `siteID`.
17+
18+
This is how we pull down your build environment variables and manage your addons on your local machine.
19+
1120
## Usage
1221

1322
- `netlify dev` start a local dev server for the build tool you're using
@@ -16,7 +25,7 @@ It automatically detects common tools like Gatsby, Hugo, React Static, Eleventy,
1625

1726
As these commands are expected to be frequently used, it may be helpful to define aliases in your terminal (Mac: [bash](https://jonsuh.com/blog/bash-command-line-shortcuts/), [zsh](https://askubuntu.com/questions/758496/how-to-make-a-permanent-alias-in-oh-my-zsh), Windows: [doskey](https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt), [registry](https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt)) to your personal preference. For example:
1827

19-
```
28+
```bash
2029
## ~/.zshrc
2130
alias ndeploy="netlify deploy --prod"
2231
alias nd="netlify dev"
@@ -31,13 +40,13 @@ Currently the Netlify dev plugin is in private beta. You'll need to follow these
3140

3241
Make sure Netlify CLI is installed and up to date:
3342

34-
```
43+
```bash
3544
npm install -g netlify-cli
3645
```
3746

3847
Then clone and activate the plugin:
3948

40-
```
49+
```bash
4150
git clone [email protected]:netlify/netlify-dev-plugin.git
4251
cd netlify-dev-plugin
4352
npm install
@@ -172,7 +181,7 @@ Add-ons are a way for Netlify users to extend the functionality of their Jamstac
172181
173182
To try out an add-on with Netlify dev, run the `netlify addons:create` command:
174183
175-
```
184+
```bash
176185
netlify addons:create fauna
177186
```
178187
@@ -186,8 +195,10 @@ After you have installed an add-on, it will be visible with the `netlify addons:
186195
187196
To share your ongoing dev session with a coworker, just run Netlify Dev with a `--live` flag:
188197
189-
```
198+
```bash
190199
netlify dev --live
191200
```
192201
193202
You will get a URL that looks like `https://clever-cray-2aa156-6639f3.netlify.live/`. This can be accessed by anyone as long as you keep your session open.
203+
204+
> Note: there are currently known issues with ending the live session alongside your webdevserver. We are working on fixing it. In the mean time you can run `ps aux | grep live-tunnel` and kill these sessions manually.

0 commit comments

Comments
 (0)