This project is a Handlebars.js live editor to test out compiled templates with hot reload. It allows you to edit Handlebars templates and see the changes live in the browser.
-
Install Dependencies:
npm install
-
Run the Development Server:
npm run dev
-
Open the Live Editor: Open your browser and navigate to http://localhost:5173/.
-
Edit the Template: Edit the template live on
src/templates/template.hbs
. Any changes you make will be reflected in the browser immediately. -
Style Modifications:
- Modify the styles by editing
src/templates/template-style.css
. - Alternatively, you can use inline CSS within the
template.hbs
file to modify the styles directly.
- Modify the styles by editing
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 20px;
}
h1 {
color: #333;
}
ul {
list-style-type: none;
padding: 0;
}
li {
background-color: #fff;
margin: 5px 0;
padding: 10px;
border: 1px solid #ddd;
}
Enjoy editing your Handlebars templates with live reload!