https://github.com/lfortin/vite-backbone
Starter template for Backbone.
https://github.com/lfortin/vite-backbone
backbone backbonejs boilerplate bootstrap frontend handlebars javascript jquery starter template underscore vite
Last synced: about 2 months ago
JSON representation
Starter template for Backbone.
- Host: GitHub
- URL: https://github.com/lfortin/vite-backbone
- Owner: lfortin
- License: mit
- Created: 2025-05-24T14:54:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-24T15:55:59.000Z (11 months ago)
- Last Synced: 2025-06-24T16:49:02.653Z (11 months ago)
- Topics: backbone, backbonejs, boilerplate, bootstrap, frontend, handlebars, javascript, jquery, starter, template, underscore, vite
- Language: JavaScript
- Homepage:
- Size: 1.28 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vite-backbone
> ๐ฆ Starter template for Backbone.js apps using Vite, Bootstrap 5, Handlebars, jQuery, and Underscore.
[](https://vitejs.dev/)
[](https://backbonejs.org/)
[](LICENSE)
[](https://vitest.dev/)
[](https://oxc.rs/)
---
## ๐ Features
- โ
Backbone Views, Models, Collections, and Routers
- ๐จ Bootstrap 5 layout & styling
- ๐ Handlebars.js for logic-less templating
- โก Vite for modern development and lightning-fast builds
- ๐งช Unit testing with Vitest
- ๐ Oxlint pre-configured for common globals
- ๐ Globals for `$`, `_`, `Backbone`, `Handlebars`
- ๐ง Easily configurable and extendable
---
[](https://github.com/lfortin/vite-backbone/blob/main/public/screenshot.png?raw=true)
Try it out online:
๐ [Live Demo](https://lfortin.github.io/vite-backbone-demo)
---
## ๐ Template Structure
```text
โโโ index.html # Main app page
โโโ index-cdn.html # CDN-specific app page
โโโ public/ # Static assets
โโโ src/
โ โโโ collections/ # Backbone Collections
โ โโโ data/ # Static data files
โ โโโ models/ # Backbone Models
โ โโโ routers/ # Backbone Routers
โ โโโ styles/
โ โ โโโ style.scss # Custom styles
โ โโโ views/ # Backbone Views
โ โโโ main.js # App entry point & Router init
โ โโโ main-cdn.js # App entry point for CDN-specific build
โโโ tests/ # Unit tests
```
## ๐ ๏ธ Usage
### 1. Clone & Install
```bash
git clone https://github.com/lfortin/vite-backbone.git
cd vite-backbone
npm install
```
### 2. Start Development Server
```bash
npm run dev
```
### 3. Build for Production
```bash
npm run build
```
### Using CDN links for external dependencies
```bash
npm run dev:cdn
npm run build:cdn
```
## ๐งช Running Tests
This project uses [Vitest](https://vitest.dev/) for unit testing.
To run all tests:
```bash
npm run test
```
---
## ๐ Linting Code
This project uses [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) with a modern configuration tailored for Backbone, Handlebars, jQuery, Underscore and Vitest.
To run the linter:
```bash
npm run lint
```
---
## ๐ License
MIT-0 ยฉ [lfortin](https://github.com/lfortin)