A microkernel for modular javascript, a toolchain for modern front-end, a micro-framework for growable WebApp

npm install ozjs
607 downloads in the last week
626 downloads in the last month
>> 中文版  


OzJS is NOT yet another script loader, but a microkernel that provides sorely-missing module mechanism at runtime (that means it mainly works at language-level, not file-level. Use Ozma.js to process files statically at build time based on the same mechanism) for large/complex javascript program, compatible with the de facto standards (AMD, NodeJS/CommonJS and traditional module pattern).

Even better, it was implemented earlier than the well-known RequireJS, so there are differences between similar APIs in philosophy and approach, which bring more value.

The API and code of oz.js are minimalist and stable. It won’t add new features that aren't truly needed (It's absolutely bad practice to meet new requirements through new configuration options or new plugins for a module mechanism provider!). The Oz project now focuses on providing bundles of powerful and yet micro-framework friendly AMD modules.



  • Scaffolding tool for OzJS which offers a packaging workflow integrates toolchain, micro-framework and many best practices
  • oz.js + iStatic + Grunt + Yo + ...
  • Source code


  • Intelligent autobuild tool for OzJS
  • Unique ability to support transparent dynamic dependence
  • Source code


  • A static-file dependency manager more than a package manager
  • Let you quickly and automatically add modules of specified (or latest) version to your project
  • Source code



  • Transform code from one format to another
  • template > AMD, AMD > CJS, CJS > AMD...
  • Source code

OzJS Adapter:

  • Mini define/require mplementation for old web page
  • Transform AMD module into traditional module pattern
  • Source code


It is time to stop using All-in-One JavaScript library or framework which bundle all functionalities and solutions within a single global namespace.

OzJS Project provides plenty of tiny, mutually independent, single purpose modules to help you build(mix and match) your own MVC(or suchlike) framework.


  • A simple, compact and consistent implementation of a variant of CommonJS's Promises and Events
  • Source code


  • A tiny, pure, event-based model wrapper for the MVC or MDV (Model-driven Views) pattern.
  • Source code


  • A jQuery-compatible and non-All-in-One library which is more "Zepto" than Zepto.js
  • Source code


  • Standalone UI event delegate implementation
  • Source code


  • A lightweight implementation of routing and URL manager
  • Source code


  • An animation library which uses "stage" and "actor" as metaphors
  • Source code


  • A collection of OzJS core modules that form a library called "Mo"
  • Modules overview
    • mo/lang
      • ES5/6 shim and minimum utilities for language enhancement
    • mo/domready
      • Non-plugin implementation of cross-browser DOM ready event
      • Based on OzJS's built-in module -- 'finish'
    • mo/browsers
      • Standalone jQuery.browsers supports skin browsers popular in China
    • mo/cookie
      • Simple wrapping for managing cookie
    • mo/template
      • A lightweight and enhanced micro-template implementation, and minimum utilities
    • mo/network
      • Standalone jQuery.ajax API and enhanced getJSON, and so on
    • mo/easing
      • An easing library supports jquery.js, standalone module and CSS timing functions
    • mo/mainloop
      • Implement and manage single loop for WebApp life cycle
      • Provide tweening API for both property animation and frame animation(canvas or css)
    • mod/uiproxy
      • Standalone and most efficient implementation of UI event delegation
      • Coming soon...
    • mo/key
      • Wrapping API for keyboard events
      • Support key sequence, multiple key press, ...
  • Source code

UI Components  

Momo (MoMotion)

  • A framework and a collection for separate and simple implementation of touch gestures
  • Source code


  • OO-based UI behavior modules behind CardKit's view components
  • Modules overview
    • moui/control
      • Minimal stateful component
    • moui/picker
      • Compose of Control objects
    • moui/overlay
      • Minimal overlay component
    • moui/actionview
      • Inherit from Overlay
      • Compose of Picker objects
    • moui/modalview
      • Inherit from Overlay
    • moui/growl
      • Inherit from Overlay
    • moui/ranger
      • Minimal range component
    • moui/util/stick
      • Stick a DOM element to anther from any clock position
    • More
  • Source code

App Framework


  • A mobile UI framework provides building blocks which are classified as "Card", "Unit" and "Component" to help you build mobile web apps quickly and simply, or transfer entire website to native-like web app for touch devices.
  • Source code

Game Engine

Under construction...


Quick Start

Install the scaffolding/workflow tool then try the ozjs:app generator.

Demo App  

In the Real World

Follow @ozjs  

More References

Release History

See changelog


Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.

npm loves you