WARNING: This documentation is for an old version of mithril! Please see the current docs for more accurate info.

Installation

Mithril is available from a variety of sources:


Direct download

You can download a zip of the latest version version here.

Links to older versions can be found in the change log

In order to use Mithril, extract it from the zip file and point a script tag to the .js file:

<script src="mithril.min.js"></script>

CDNs (Content Delivery Networks)

You can also find Mithril in cdnjs and jsdelivr

Content delivery networks allow the library to be cached across different websites that use the same version of the framework, and help reduce latency by serving the files from a server that is physically near the user's location.

CdnJs

<script src="//cdnjs.cloudflare.com/ajax/libs/mithril/0.1.1/mithril.min.js"></script>

JsDelivr

<script src="//cdn.jsdelivr.net/mithril/0.1.1/mithril.min.js"></script>

Bower

Bower is a package manager for NodeJS. If you're using NodeJS already or planning on using Grunt to create a build system, you can use Bower to conveniently keep up-to-date with Mithril versions.

Assuming you have NodeJS installed, you can install Bower by typing this in the command line:

npm install -g bower

And you can download Mithril by typing this:

bower install mithril

Then, to use Mithril, point a script tag to the downloaded file:

<script src="/bower_components/mithril/mithril.min.js"></script>