Git Product home page Git Product logo

backbone-boilerplate's Introduction

Boilerplate

Build Status Coverage Status Dependency Status

Backbone Boilerplate

This boilerplate is the product of much research and frustration. Existing boilerplates freely modify Backbone core, lack a build process, and are very prescriptive; Backbone Boilerplate changes that.

The Backbone Boilerplate is a way of organizing a web application with some opinionated defaults: such as Backbone, Lo-Dash (Underscore compatibility build), jQuery, RequireJS, Bower, Grunt, Karma, and the HTML5 Boilerplate styles. Built in testing support for: QUnit, Jasmine, and Mocha with Chai.

Organize your application with a logical file structure, develop your Models/Collections/Views/Routers inside modules, and build knowing you have efficient code that will not bottleneck your users.

Thanks to our Contributors! Special Thanks to: cowboy, iros, nimbupani, wookiehangover, and jugglinmike for helping me create this project. Extra Special Thanks to: Paul Guinan for giving me usage rights to his fantastic Boilerplate character.

Documentation

View the Backbone Boilerplate documentation here:

GitHub Wiki

Getting started

The easiest way to get started is to install Git and clone the repository:

# Using Git, fetch only the latest commits.  You won't need the full history
# for your project.
git clone --depth 1 https://github.com/backbone-boilerplate/backbone-boilerplate

# Move the repository to your own project name.
mv backbone-boilerplate my-project

You will need to download and install Node.js if you want to use the commands in the following sections.

Updating dependencies

Third party packages may update independently from this main repo, so it's a good idea to update after fetching.

# Install global dependencies.  Depending on your user account you may need to
# gain elevated privileges using something like `sudo`.
npm install -g grunt-cli bower

# Optionally install coveralls (integration is baked in with Travis CI).
npm install -g coveralls

# Install NPM dependencies.
npm install

# Install Bower dependencies.
bower install

Build process

The build process consists of numerous Grunt plugin tasks that work together to optimize your application.

# To run the build process, run the default Grunt task.
grunt

# Run a build and test the now optimized assets.
grunt default server:release

Running tests

To run tests, simply add .spec.js files throughout your application and they will be automatically picked up by the runner. You can find example test specs in the test directory.

To run Karma as a daemon: Which will automatically run your tests after you save.

grunt karma:daemon

To run Karma tests once and output the results:

grunt karma:run

After either above command is run, code coverage reports will be available in the test/coverage folder.

By default, the test runner is Mocha and Chai. You can easily change this by editting the commented regions of the karma configuration in Gruntfile.js.

License

Copyright © 2014 Tim Branyen (@tbranyen)
Licensed under the MIT license.

backbone-boilerplate's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.