Commit ef83775
feat(serve): Watch and serve all needed files (#91)
Running `npm run serve` will watch for changes in the source files and
rebuild all `css` and `js` files accordingly in the `dist` folder. It
will also expose the same files on `http://localhost:8080/` (by
default, if port `8080` is already taken it will move to an available
one).
This will let developers use a specific branch/version of docsearch in
their projects. Just open a new tab and run `npm run serve` in the
docsearch repo, and you'll be able to include the scripts from the
running server in your HTML.
As files are automatically regenerated on disk whenever a change is
detected, you can also `require` files by targeting the `dist` folder.1 parent 54e7d12 commit ef83775
2 files changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | | - | |
9 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
0 commit comments