Home

Awesome

Mantri

Traditionaλ JS Dependency System.

Mantri helps you manage your application's dependencies.

Visit http://mantrijs.com

Build Status

NPM

Attention 0.1.x The current 0.2.x version brings some rather breaking changes. Read the migration guide for more information.

WARNING NOT MAINTAINED

MantriJS is no longer actively maintained. We'd suggest you use browserify for your frontend packaging needs.

Mantri is...

Mantri does not...

Getting Started

Mantri consists of the Web Runtime and the Command Line Tools. The Web Runtime's job is to load the files of your application during development. The Command Line Tools perform various tasks like building your application and calculating dependencies.

Install

In order to get started, you'll want to install Mantri's command line interface (CLI) globally. You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to do this.

npm install -g mantri-cli --silent

This will put the mantri command in your system path, allowing it to be run from any directory.

Note that installing mantri-cli does not install the mantri library! The job of the mantri CLI is simple: run the version of mantri which has been installed in your application. This allows multiple versions of mantri to be installed on the same machine simultaneously.

On your project, install the mantri library localy:

npm install mantri --silent --save-dev

Read the Getting Started Guide for a more detailed introduction.

Two things to keep in mind

The Web API

Each file should provide a unique namespace and can require any number of other namespaces:

goog.provide('app');

goog.require('app.router');
goog.require('app.controller');
goog.require('app.view');

Read more about the web API in this wiki page

Dependencies

Google Closure Tools have a couple dependencies, which are reasonable enough for any developer:

Hands On

The classical ToDo MVC application has been refactored to use the Mantri Dependency System. You can find the repo here, or clone it:

git clone git@github.com:closureplease/todoAppMantri.git

Full Documentation

... can be found in the wiki or view the same on a more cozy web version at mantrijs.com

Start with the Getting Started Guide for a more detailed introduction.

Release History