Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hamilton committed Nov 9, 2012
1 parent 830c56a commit 3409365
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Tinyapp - Minimal module management

Tinyapp provides application module namespacing and event-based communication to help decouple and coordinate small modules, as opposed to building up a large, tightly coupled, monolithic app.

Tinyapp assumes CommonJS modules, AKA Node style `require()`.

Need help using CommonJS in the browser? Check out [Browserify](https://github.com/substack/node-browserify).

Tinyapp exposes .loadReady() and .renderReady() methods so you can use .load() and .render() for whatever you want. Inside your module:

var api = new Backbone.View.extend({
render: function render() {
// do stuff to dom
}
});

function myLoad() {
// get some data asynchronously from server
}

function myRender() {
// draw stuff to screen
}

app.loadReady(myLoad);
app.renderReady(myRender);
app.register(namespace, api);
2 changes: 1 addition & 1 deletion dist/tinyapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(){
/*! tinyapp - v0.0.1 - 2012-11-07
/*! tinyapp - v0.0.1 - 2012-11-08
* Copyright (c) 2012 Eric Elliott;
* Licensed under the license */

Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(){
/*! tinyapp - v0.0.1 - 2012-11-07
/*! tinyapp - v0.0.1 - 2012-11-08
* Copyright (c) 2012 Eric Elliott;
* Licensed under the license */

Expand Down

0 comments on commit 3409365

Please sign in to comment.