Skip to content

About

The backbone build system provides a development environment to build backbone apps so that you don't have to build your own system from scratch.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backbone Build System

The backbone build system provides a development environment to build backbone apps so that you don't have to build your own system. It can do the following:

  1. Provide the capability of using CommonJS for your modules, minifying your JavaScript into a single bundle on save, and provide tiny production bundles (with browserify and its plugins tinyify and watchify).
  2. Browserify transform for _.template to support stand alone *.tmpl files with node-underscorify.
  3. Use backbone without jQuery (with browserify's exclude feature). Without jQuery you'll need these small changes:
    1. Use Backbone.NativeView in place of Backbone.View.
    2. Use Backbone.NativeAjax for Backbone.ajax.
  4. Mouse free browser refresh on file save (with browsersync).
  5. Serve gzip bundles so you can test your bundles in a simulated production environment (with http-server and gzip). This can be useful when running Lighthouse.

Setup

$ npm install

Development

While editing and saving files, these two commands provide you with the following during development.

Open 2 terminals:

Terminal 1 - Start the dev web server, which refreshes the browser(s) on file save.

$ npm start

Terminal 2 - Start the dev environment which builds a dev bundle on file save.

$ npm run dev

Production Testing

This is useful for building your production bundles.

Build your bundle for production

$ npm run build

Start a production level webserver (gzip is already setup)

$ npm start-prod

VS Code

Colorize your underscore templates with Underscore Template Colorizer.

Backbone, The Primer

I found this introductory helpful for those new to backbone.js or those in need of a refresher: Backbone, The Primer

Official backbone.js sources

About

The backbone build system provides a development environment to build backbone apps so that you don't have to build your own system from scratch.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages