From 1cb6dad5118e4a50727a5753a5499cc9beb3c5e9 Mon Sep 17 00:00:00 2001 From: nvms Date: Wed, 9 Oct 2024 17:02:33 -0400 Subject: [PATCH] ok --- README.md | 13 +++++++++++++ internal/esr/init.go | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6c724e..78a3aa6 100644 --- a/README.md +++ b/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 diff --git a/internal/esr/init.go b/internal/esr/init.go index 452c8ee..bd1e36c 100644 --- a/internal/esr/init.go +++ b/internal/esr/init.go @@ -10,12 +10,13 @@ var indexHtml = ` - esr + Application + {{ css }}
- {{ livereload }} + {{ js }} ` @@ -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