npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mantri

v0.2.3

Published

Traditionaλ JS Dependency System

Downloads

29

Readme

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...

  • A Robust and discreet Dependency Management System.
  • Synchronous. Everything is done before DOMContentLoaded event triggers.
  • A Grunt plugin.
  • A command line tool.
  • Cross-browser.

Mantri does not...

  • Dictate how you write your code. Vanilla JS, AMD, commonJS, knock yourselves out.
  • Need any runtime on your production file.
  • Need any dependency declarations in your production file.
  • Have any problem moving around JS files or folders.
  • Have any problem working with other dependency systems.
  • Polute your namespace. But you are free to if you want.

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

  • Every time you edit or create a dependency declaration you need to run the mantriDeps task or the mantri deps command to re-calculate your dependencies.

  • Mantri is not meant to be used on your production environment. Whenever you want to deploy your app use the mantriBuild task or the mantri build command to bundle and minify your application into one file.

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 [email protected]: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

  • v0.2.3, 26 Feb 2015
    • Upgraded all packages to latest.
  • v0.2.2, 11 Nov 2013
    • The web component will now warn if mantriConf.json could not be loaded.
  • v0.2.1, 5 Nov 2013
    • Added feature to use Closure Library in the codebase. Use the key closureLibrary and set the path.
  • v0.2.0, 4 Nov 2013 Breaking Changes Read the migration guide.
    • New Feature: Can now build multiple targets (Built-Modules).
    • Added support for SourceMaps, available through the sourceMapFile key.
    • Changed mantriConf.json keys:
      • baseUrl --> jsRoot
      • libs --> vendorLibs
      • build.input --> build.src
      • build.exclude --> build.excludeVendor
      • New key: buildModules
    • Changed format of outputWrapper, now uses Closure's pattern.
    • New experimental key _noCompile, to not perform any compilation steps.
    • Published web component on Bower repo.
  • v0.1.5, 13 May 2013
  • v0.1.1, 12 Apr 2013
    • Bug fixes on web component for IE6,7,8,9
  • v0.1.0, 03 Apr 2013
    • First stable version
    • Added CLI support
  • v0.0.1, Mid Feb 2013
    • Big Bang