seanbollin / terse

Minimal JavaScript MVC for multi-page apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terse:

A framework for enabling per-page javascript on multi-page web applications. Build Status

===

Resources for Newcomers

Usage:

Include terse.js in your HTML:

<script type="text/javascript" src="/js/terse.js"></script>

Place this fragment of code on the bottom of each page:

<script type="text/javascript">
    terse.go("<?php terseJson ?>");
</script>

Provide an object with a controller, action, and params:

PHP:

$terseJson = ["controller": "purchases", "action": "edit", "params": "showPastOrders=false"];

Ruby on Rails:

def index
    @terseJson = {:controller => "purchases", :action => "edit", :params => "showPastOrders=false"}

    respond_to do |format|
        format.html # index.html.erb
    end
end

To run the tests:

npm install
npm test

Resources for Newcomers

About

Minimal JavaScript MVC for multi-page apps.


Languages

Language:JavaScript 100.0%