Batman.js is no longer in production at Shopify and is not actively developed. :(
batman.js is a framework for building rich single-page browser applications.
- A stateful MVC architecture that emphasizes object-oriented design, convention over configuration, and communication via REST.
- A developer-friendly API inspired by Ruby on Rails and designed for CoffeeScript.
- Powerful two-way data binding. Every property tracks its sources and updates automatically when its sources change.
- Pure HTML templates so you can use whatever templating engine you like. Liquid-style filters make designers & developers feel right at home.
- Lots more: expressive routing, model validations, model associations, I18n,
localStorage
persistence...
To find out more or get started with batman.js, check out the website: http://batmanjs.org.
Well-tested contributions are always welcome! Here's what you should do:
git clone [email protected]:batmanjs/batman.git
npm install
npm install -g gulp
If you don't already have Node.js, the installation instructions are here.
batman.js uses karma and QUnit for orchestrating tests.
To run the tests, run the following command from the project root:
gulp # starts webpack & karma
Assuming you have Chrome installed, it should automatically open and start running the tests. The test outcome will appear in your terminal.
The tests are in tests/batman
. All test files in there are automatically picked up and run.
The API documentation is written using literate CoffeeScript.
The API documentation includes its own set of tests, which serves as both an assurance that the API hasn't broken, as well as a set of examples for how to use it. These tests need not be comprehensive (that's what the regular tests are for), but should cover the most common use cases. They're automatically run alongside the regular tests, so you don't need to run them manually.
If you want to render the API docs, see the README for batmanjs.github.io.
Please read the README for the docs before writing any.
If it's good code that fits with the goals of the project, we'll merge it in!
Task | Does... |
---|---|
gulp |
Does it all: starts Karma and watches for changes, running finalize on any change |
gulp build |
compiles files into /dist |
gulp finalize |
runs build and creates minified versions |
gulp test |
starts Karma runner |
gulp test:travis |
finalize s then runs the tests once with PhantomJS |
batman.js is copyright 2014 by Shopify, released under the MIT License (see LICENSE for details).