Brunch skeleton aimed at mobile apps, using CoffeeScript, jQuery Mobile, Backbone, Handlebars, Stylus, MVC pattern
Clone this repo or download the ZIP file (you won't need the history). Installing Brunch globally is recommended
npm install -g brunch). Then run
npm install in the skeleton directory, followed by
brunch build (or
brunch w -s for automatic rebuilding on changes and Brunch's integrated web server). See more info on the official
site of Brunch.
Public domain – use it however you want. Exceptions are files that explicitly state (or are obviously under) another license.
iOS tab icons taken from the wonderful iconza icon set.
TODO: update this
config.coffee README.md /app/ /assets/ index.html images/ /lib/ models/ styles/ views/ templates/ application.coffee initialize.coffee /vendor/ scripts/ backbone.js jquery.js console-helper.js underscore.js styles/ normalize.css helpers.css
config.coffeecontains configuration of your app. You can set plugins / languages that would be used here.
app/assetscontains images / static files. Contents of the directory would be copied to
build/without change. Other
app/directories could contain files that would be compiled. Languages, that compile to JS (coffeescript, roy etc.) or js files and located in app are automatically wrapped in module closure so they can be loaded by
app/viewscontain base classes your app should inherit from.
app/controllerscontains example controllers using Backbone's hashbang routing
test/contains feature & unit tests.
vendor/contains all third-party code. The code wouldn’t be wrapped in modules, it would be loaded instantly instead.
This all will generate
public/ (by default) directory when
brunch build or
brunch watch is executed.
Versions of software the skeleton uses:
- jQuery 1.8.2
- Backbone 0.9.2 (only event system, rest stripped out)
- Underscore 1.3.3
- jQuery Mobile 1.2.0 (with default theme)
- i18next 1.5.7 (for translations)
rebuild-daemon.py --target=web --debug and the app will be built in the folder
src\public. The scripts
Start development server.* serve this folder if the right tools are installed (take a look inside the scripts, Python
and Twisted on Windows, for example). Of course you can serve it using your own web server instead.
Import the project in
android and all projects in
dependencies/android into your Eclipse workspace. Open the
properties of the "Mobile Skeleton" project and check whether the builder "Force rebuild Mobile Skeleton" is configured
rebuild-daemon.py --target=android --debug and the app will be rebuilt on any changes. Then simply start the app
Update the CordovaLib project reference using
Remaining instructions: TODO ;)
Install jsdom by executing
npm install jsdom in the
src directory. That will try to install contextify as well which
requires a binary module. For Windows, you can find binaries here or
you can try to compile them yourself (npm will try it for you). If you want to use the binaries, first run
npm install contextify to install its dependencies (e.g. "bindings" library) and then copy over the binaries to the
If you get an error like
TypeError: Cannot call method 'querySelectorAll' of undefined, contextify is missing from
All test specs must have a filename like
src/test/view_test.coffee, note that
view.coffee won't work.