125 lines
7.1 KiB
HTML
125 lines
7.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Installation
|
|
- Mithril</title>
|
|
<meta name="description" value="Mithril.js - a Javascript Framework for Building Brilliant Applications" />
|
|
<link href="lib/prism/prism.css" rel="stylesheet" />
|
|
<link href="style.css" rel="stylesheet" />
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<nav class="container">
|
|
<a href="index.html" class="logo"><span>○</span> Mithril</a>
|
|
<a href="getting-started.html">Guide</a>
|
|
<a href="mithril.html">API</a>
|
|
<a href="community.html">Community</a>
|
|
<a href="http://lhorie.github.io/mithril-blog">Learn</a>
|
|
<a href="installation.html">Download</a>
|
|
<a href="http://github.com/lhorie/mithril.js" target="_blank">Github</a>
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
<section class="content">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col(3,3,12)">
|
|
<h2 id="core-topics">Core Topics</h2>
|
|
<ul>
|
|
<li><a href="installation.html">Installation</a></li>
|
|
<li><a href="getting-started.html">Getting Started</a></li>
|
|
<li><a href="routing.html">Routing</a></li>
|
|
<li><a href="web-services.html">Web Services</a></li>
|
|
<li><a href="components.html">Components</a></li>
|
|
</ul>
|
|
<h2 id="advanced-topics.html">Advanced Topics</h2>
|
|
<ul>
|
|
<li><a href="auto-redrawing.html">The Auto-Redrawing System</a></li>
|
|
<li><a href="integration.html">Integrating with Other Libraries</a></li>
|
|
<li><a href="optimizing-performance.html">Compiling Templates</a></li>
|
|
</ul>
|
|
<h2 id="misc">Misc</h2>
|
|
<ul>
|
|
<li><a href="comparison.html">Differences from Other MVC Frameworks</a></li>
|
|
<li><a href="benchmarks.html">Benchmarks</a></li>
|
|
<li><a href="practices.html">Good Practices</a></li>
|
|
<li><a href="tools.html">Useful Tools</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col(9,9,12)">
|
|
<h2 id="installation">Installation</h2>
|
|
<p>Mithril is available from a variety of sources:</p>
|
|
<hr>
|
|
<h3 id="direct-download">Direct download</h3>
|
|
<p>You can <a href="mithril.min.zip">download a zip of the latest version here</a>.</p>
|
|
<p>Links to older versions can be found in the <a href="change-log.html">change log</a>.</p>
|
|
<p>In order to use Mithril, extract it from the zip file and point a script tag to the <code>.js</code> file:</p>
|
|
<pre><code class="lang-markup"><script src="mithril.min.js"></script>
|
|
</code></pre>
|
|
<p>Note that in order to support older versions of IE, you need to include <a href="tools.html#internet-explorer-compatibility">some shims</a>.</p>
|
|
<hr>
|
|
<h3 id="cdns-content-delivery-networks-">CDNs (Content Delivery Networks)</h3>
|
|
<p>You can also find Mithril in <a href="http://cdnjs.com/libraries/mithril/">cdnjs</a> and <a href="http://www.jsdelivr.com/#!mithril">jsDelivr</a>.</p>
|
|
<p>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.</p>
|
|
<h4 id="cdnjs">cdnjs</h4>
|
|
<pre><code class="lang-markup"><script src="//cdnjs.cloudflare.com/ajax/libs/mithril/0.2.1/mithril.min.js"></script>
|
|
</code></pre>
|
|
<h4 id="jsdelivr">jsDelivr</h4>
|
|
<pre><code class="lang-markup"><script src="//cdn.jsdelivr.net/mithril/0.2.1/mithril.min.js"></script>
|
|
</code></pre>
|
|
<hr>
|
|
<h3 id="npm">NPM</h3>
|
|
<p>NPM is the default package manager for <a href="http://nodejs.org/">NodeJS</a>. If you're using NodeJS already or planning on using <a href="http://gruntjs.com/">Grunt</a> to create a build system, you can use NPM to conveniently keep up-to-date with Mithril versions.</p>
|
|
<p>Assuming you have NodeJS installed, you can download Mithril by typing this:</p>
|
|
<pre><code>npm install mithril
|
|
</code></pre><p>Then, to use Mithril, point a script tag to the downloaded file:</p>
|
|
<pre><code class="lang-markup"><script src="/node_modules/mithril/mithril.min.js"></script>
|
|
</code></pre>
|
|
<hr>
|
|
<h3 id="bower">Bower</h3>
|
|
<p><a href="http://bower.io">Bower</a> is a frontend package manager built in <a href="http://nodejs.org/">NodeJS</a>. If you're using NodeJS already or planning on using <a href="http://gruntjs.com/">Grunt</a> to create a build system, you can use Bower to conveniently keep up-to-date with Mithril versions.</p>
|
|
<p>Assuming you have NodeJS installed, you can install Bower by typing this in the command line:</p>
|
|
<pre><code>npm install -g bower
|
|
</code></pre><p>And you can download Mithril by typing this:</p>
|
|
<pre><code>bower install mithril
|
|
</code></pre><p>Then, to use Mithril, point a script tag to the downloaded file:</p>
|
|
<pre><code class="lang-markup"><script src="/bower_components/mithril/mithril.min.js"></script>
|
|
</code></pre>
|
|
<hr>
|
|
<h3 id="component">Component</h3>
|
|
<p><a href="http://component.github.io">Component</a> is another package manager for <a href="http://nodejs.org/">NodeJS</a>. If you're using NodeJS already or planning on using <a href="http://gruntjs.com/">Grunt</a> to create a build system, you can use Component to conveniently keep up-to-date with Mithril versions.</p>
|
|
<p>Assuming you have NodeJS installed, you can install Component by typing this in the command line:</p>
|
|
<pre><code>npm install -g component
|
|
</code></pre><p>And you can download Mithril by typing this:</p>
|
|
<pre><code>component install lhorie/mithril
|
|
</code></pre><p>Then, to use Mithril, point a script tag to the downloaded file:</p>
|
|
<pre><code class="lang-markup"><script src="/components/lhorie/mithril/master/mithril.js"></script>
|
|
</code></pre>
|
|
<hr>
|
|
<h3 id="rails">Rails</h3>
|
|
<p>Jordan Humphreys created a gem to allow integration with Rails:</p>
|
|
<p><a href="https://github.com/mrsweaters/mithril-rails">Mithril-Rails</a></p>
|
|
<p>It includes support for the <a href="https://github.com/insin/msx">MSX</a> HTML templating syntax from Jonathan Buchanan.</p>
|
|
<hr>
|
|
<h3 id="github">Github</h3>
|
|
<p>You can also fork the latest stable project <a href="https://github.com/lhorie/mithril">directly from Github</a>.</p>
|
|
<p>If you want to use the bleeding edge version, you can <a href="https://github.com/lhorie/mithril.js">fork the development repository</a>.</p>
|
|
<p>Be aware that even though Mithril has tests running in a continuous integration environment, the bleeding edge version might occasionally break. If you're interested in helping improve Mithril, you're welcome to use the bleeding edge version and report any bugs that you find.</p>
|
|
<p>In order to update a forked version of Mithril, <a href="https://help.github.com/articles/syncing-a-fork">follow the instructions on this page</a>.</p>
|
|
<h4 id="using-bleeding-edge-from-npm">Using bleeding edge from NPM</h4>
|
|
<p>To use the bleeding edge version from npm, use the following command:</p>
|
|
<pre><code>npm install git://github.com/lhorie/mithril.js#next --save
|
|
</code></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<footer>
|
|
<div class="container">
|
|
Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>
|
|
<br />© 2014 Leo Horie
|
|
</div>
|
|
</footer>
|
|
<script src="lib/prism/prism.js"></script>
|
|
</body>
|
|
</html>
|