mirror of
https://github.com/nvms/esr.git
synced 2025-12-15 14:30:53 +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.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
# Defaults
|
||||
bundle: true
|
||||
|
||||
@ -10,12 +10,13 @@ var indexHtml = `<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>esr</title>
|
||||
<title>Application</title>
|
||||
{{ css }}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="index.js" type="module"></script>
|
||||
{{ livereload }}
|
||||
{{ js }}
|
||||
</body>
|
||||
</html>`
|
||||
|
||||
@ -26,7 +27,7 @@ sourcemap: true
|
||||
outdir: public
|
||||
|
||||
watch:
|
||||
paths: ['src/**/*.{ts,tsx,js,jsx,css,scss,html}']
|
||||
paths: ['src/**/*.{ts,tsx,js,jsx,css,scss,html}', 'public/index.html']
|
||||
|
||||
serve:
|
||||
html: public/index.html
|
||||
|
||||
Loading…
Reference in New Issue
Block a user