https://github.com/jarred-sumner/htmlbuild
Automatically configure esbuild from html
https://github.com/jarred-sumner/htmlbuild
esbuild
Last synced: about 2 months ago
JSON representation
Automatically configure esbuild from html
- Host: GitHub
- URL: https://github.com/jarred-sumner/htmlbuild
- Owner: Jarred-Sumner
- Created: 2021-03-09T10:29:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-12T01:36:09.000Z (about 4 years ago)
- Last Synced: 2025-04-17T10:58:26.375Z (about 2 months ago)
- Topics: esbuild
- Language: JavaScript
- Homepage:
- Size: 72.3 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# htmlbuild
Automatically configure & run esbuild from `` and `<link rel="stylesheet">` used in an .html file.
## Installation
npm:
```bash
npm install -g @jarred/htmlbuild
```yarn:
```yarn
yarn global add @jarred/htmlbuild
```## Usage
```
# All additional flags are forwarded to esbuild.
htb index.html --outdir=dist
htmlbuild index.html --outdir=dist
```This lets you use an HTML file to configure esbuild.
Given an HTML file like this:
```html
<html>
<head>
<link href="foo.css" rel="stylesheet" />
<!- Notice the TypeScript: -->
<script src="./index.ts">
HI!
HI!