mirror of
https://github.com/nvms/esr.git
synced 2025-12-15 22:40:52 +00:00
ok
This commit is contained in:
parent
81b941558c
commit
1cb6dad511
13
README.md
13
README.md
@ -13,8 +13,21 @@
|
|||||||
|
|
||||||
This is a simple esbuild-powered dev server. It has livereloading. It's fast. It's configured with YAML.
|
This is a simple esbuild-powered dev server. It has livereloading. It's fast. It's configured with YAML.
|
||||||
|
|
||||||
|
For the minimalist. For the developer who misses the old web. For the developer who is tired of configuring your build tools.
|
||||||
|
|
||||||
|
## Quickstart
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ esr --serve src/index.ts
|
||||||
|
esr :: Serving on http://localhost:1234
|
||||||
|
```
|
||||||
|
|
||||||
|
`src/index.ts` is bundled with esbuild and included in the HTML page served at the URL above.
|
||||||
|
|
||||||
## Example configuration
|
## Example configuration
|
||||||
|
|
||||||
|
These are all defaults. You don't need to do any of this. You can if you want to, but you don't have to.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
# Defaults
|
# Defaults
|
||||||
bundle: true
|
bundle: true
|
||||||
|
|||||||
@ -10,12 +10,13 @@ var indexHtml = `<!DOCTYPE html>
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>esr</title>
|
<title>Application</title>
|
||||||
|
{{ css }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script src="index.js" type="module"></script>
|
|
||||||
{{ livereload }}
|
{{ livereload }}
|
||||||
|
{{ js }}
|
||||||
</body>
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ sourcemap: true
|
|||||||
outdir: public
|
outdir: public
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
paths: ['src/**/*.{ts,tsx,js,jsx,css,scss,html}']
|
paths: ['src/**/*.{ts,tsx,js,jsx,css,scss,html}', 'public/index.html']
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
html: public/index.html
|
html: public/index.html
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user