Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

crcn/mojo.js

Repository files navigation

Join the chat at https://gitter.im/mojo-js/mojo.js

MojoJS is a fast, customizable JavaScript MVC framework that runs on NodeJS, and Web.

This library comes pre-bundled with: mojo-models, views, mojo-paperclip, mojo-router, mojo-bootstrap, zepto, and inject.js.

See also

  • starter kit - seed application. Helps you get started with Mojo and browserify (commonjs).

Projects using Mojo

  • TodoMVC - todomvc example
  • Reader - reddit reader example
  • ClassDojo - server-side & client-side both run Mojo.

Build Commands

make browser # builds the app for the browser
make browser min # builds the app for the browser, and minifies

Basic Example

Below is a basic example of how you can use Mojo in the browser. Note that it's highly recommended that you use commonjs (browserify, NodeJS), or amd (requirejs, injectjs) when organizing your application.

<html>
  <head>
    <script type="text/javascript" src="mojo.js"></script>
  </head>
  <body>

    <script type="text/x-paperclip" id="hello-template">
      Hello! What's your name?

      <input type="text" data-bind="{{ model: <~>name }}"></input>

      {{#if:name}}
        <h1>Hello {{name}}!</h1>
      {{/}}
    </script>


    <script type="text/javascript">
      var view = new mojo.views.Base({
        paper: $("#hello-template").text()
      });

      document.body.appendChild(view.render());
    </script>
  </body>
</html>

About

A non-opinionated, customizable JavaScript framework designed for writing scalable web, mobile, and server-side programs

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages