|
1 |
| -# netlify-dev-plugin |
2 |
| - |
3 |
| -Netlify CLI plugin for local dev experience. [If you're interested to work on Netlify Dev and other product initatives fulltime, we are hiring.](https://boards.greenhouse.io/netlify/jobs/4215780002) |
4 |
| - |
5 | 1 | ## What is Netlify Dev?
|
6 | 2 |
|
7 | 3 | <div align="center">
|
8 | 4 | <h3>Watch the introduction (24 minutes)</h3>
|
9 | 5 | <a href="https://youtu.be/RL_gtVZ_79Q?t=812">
|
10 |
| - <img src="http://i3.ytimg.com/vi/RL_gtVZ_79Q/hqdefault.jpg" alt="link to netlify dev talk" /> |
| 6 | + <img src="http://i3.ytimg.com/vi/RL_gtVZ_79Q/hqdefault.jpg" height=200 alt="link to netlify dev talk" /> |
11 | 7 | </a>
|
12 | 8 | </div>
|
13 | 9 |
|
@@ -43,8 +39,6 @@ This is how we pull down your build environment variables and manage your addons
|
43 | 39 |
|
44 | 40 | ## Usage
|
45 | 41 |
|
46 |
| -*Watch [a 10 minute intro](https://www.youtube.com/watch?v=pIOOJD4z-Qo&feature=youtu.be) video on how to use Netlify Dev on your project.* |
47 |
| - |
48 | 42 | - `netlify dev` start a local dev server for the build tool you're using
|
49 | 43 | - `netlify dev:exec <command>` runs a shell command within the netlify dev environment
|
50 | 44 | - `netlify functions:create` bootstrap a new function
|
@@ -102,7 +96,25 @@ netlify dev --live
|
102 | 96 |
|
103 | 97 | 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.
|
104 | 98 |
|
105 |
| -> Note: there are currently known issues with ending the live session alongside your webdevserver, as well as with live reloading. We are working on fixing it, and would appreciate repro cases. In the mean time you can run `ps aux | grep live-tunnel` and kill these sessions manually. |
| 99 | +> Note: there are currently known issues with ending the live session alongside your webdevserver, as well as with live reloading. We are working on fixing it, and would appreciate repro cases, or you may check [existing issues with the `--live` tag](https://github.com/netlify/netlify-dev-plugin/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A--live). In the mean time you can run `ps aux | grep live-tunnel` and kill these sessions manually. |
| 100 | +
|
| 101 | +## netlify.toml [dev] block |
| 102 | +
|
| 103 | +Netlify Dev is meant to work with zero config for the majority of users, by using its detector system. However you may wish to assert more control over its behavior, and should make use of the new `[dev]` block in `netlify.toml` to do so: |
| 104 | +
|
| 105 | +```toml |
| 106 | +# sample netlify.toml |
| 107 | +[build] |
| 108 | + command = "yarn run build" |
| 109 | + functions = "functions" # netlify dev uses this to know where to scaffold and serve your functions |
| 110 | + publish = "dist" |
| 111 | +
|
| 112 | +# note: each of these fields are OPTIONAL |
| 113 | +[dev] |
| 114 | + command = "yarn start" # Command to start your dev server |
| 115 | + port = 3000 # Port that the dev server will be listening on |
| 116 | + publish = "dist" # If you use a _redirect file, provide the path to your static content folder |
| 117 | +``` |
106 | 118 |
|
107 | 119 | ## Project detection
|
108 | 120 |
|
|
0 commit comments