An Application Architecture Using Backbone.js
Clone or download
Pull request Compare This branch is 713 commits behind chaplinjs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src
test
.editorconfig
.gitignore
.travis.yml
AUTHORS.md
CHANGELOG.md
CONTRIBUTING.md
Gruntfile.coffee
MIT-LICENSE.txt
README.md
component.json
package.json

README.md

Chaplin

An Application Architecture Using Backbone.js

Introduction

Chaplin is an architecture for JavaScript applications using the Backbone.js library.

All information, commercial support contacts and examples are available at chaplinjs.org. Comprehensive documentation and class reference is available on GitHub.

Download the latest release on chaplinjs.org. See below on how to compile from source manually.

Building Chaplin

The Chaplin source files are originally written in the CoffeeScript meta-language. However, the Chaplin library file is a compiled JavaScript file which defines the chaplin module.

Our build script compiles the CoffeeScripts and bundles them into one file. To run the script, follow these steps:

  1. Download and install Node.js.

  2. Open a shell (aka terminal aka command prompt) and type in the commands in the following steps.

  3. Install the Node package for the grunt command line interface globally.

    sudo npm install -g grunt-cli

    On Windows, you can omit the sudo command at the beginning.

  4. Change into the Chaplin root directory.

  5. Start the build (will install dependencies and build).

    npm install
    

This creates two directories:

  • ./build/amd/ with a build using the AMD module style
  • ./build/commonjs/ with a build using the CommonJS module style

Each subdirectory contains the following files:

  • chaplin.js – The library as a compiled JavaScript file.
  • chaplin.min.js – Minified. For production use you should pick this.
  • chaplin.min.js.gz – Minified and GZip-compressed.

Running the Tests

Chaplin aims to be fully unit-tested. At the moment most of the modules are covered by Mocha tests.

How to run the tests:

  1. Follow the steps for building chaplin.

  2. Open a shell (aka terminal aka command prompt) and type in the commands in the following steps.

  3. Change into the Chaplin root directory.

  4. Start the test runner.

    npm test
    

Note that you can now additionally open test/index.html to run the tests in your browser (instead of in node). Furthermore code coverage reports are generated and may be viewed by opening test/coverage/index.html in your browser.

Ending

The Cast

The Producers