Web application seed based on Backbone.js with Require.js for async loading, themed with Twitter Bootstrap, with doT templating.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
bower.json
mimosa-config.js

README.md

Web-App-Seed

Web application seed based on Backbone.js with Require.js for async loading, themed with Twitter Bootstrap, with doT templating.

Usage

Index.html defines the single page point for the application. Define additional CSS and structure elements in index.html.

The boostrapped loading for the application javascript resources is done in assets/js/main.js. This file defines the setup for require.js along with defining a startup processes for the webapp. Additional libraries can be added/shimmed into the setup in the require.js configuration at the top of this file. Libraries are stored in assets/js/lib.

The application start point is defined in assets/js/app/app.js. This file describes the requirements for the application and exposes an initialization function to start the app. Extend this with the app specific logic.

The main backbone router that is started with the app is defined at assets/js/app/routers/router.js. Extend this with additional routes and logic.

Templates are stored in assets/js/app/templates. They are defined for use with the doT.js templating library that exposes the entirety of javascript to the templating engine. This allows templates to access and change functionality dynamically.

Development

Setup Environment:

Build Requirements:

  • Node.js
  • npm
  • Bower (npm install -g bower)
  • Mimosa (npm install -g mimosa)
  • Compass (Ruby is required. gem install compass) (compile sass and scss files to their respective css counterparts)

When the above are successfully installed, run "mimosa build" or "mimosa build --minify" from the root directory of the project. Mimosa will then download the dependencies with bower, copy them over into the src directory as the latest versions. Finally a "public" folder will be created with the results of the build. This can be used to deploy the application.

Test Requirements:

  • phantomjs (npm install -g phantomjs)

Unit tests are run automatically during the build process if the phantomjs library is available. If not they will fail and report an error. For the sake of updating the styling and templates that is okay. Anything deeper and you should be running the tests to ensure compatability.

QUnit is the testing framework that is being used, and it is already AMD compatible for the purposes of this project.

Tests are stored in assets/js/test and will be automatically parsed and run if they end with any of the following. _test.js, -test.js, _spec.js, -spec.js. It is preferred that the suffixes for tests be consistent and promptly follow the name of the module they are testing. IE... the util-test.js contains the unit tests for the util.js module.

Credits

Libraries

Tools