Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (31 sloc) 1.58 KB
<!DOCTYPE html>
<html>
<head>
<title>Aeris.js - AMD Example</title>
<link rel="stylesheet" href="../css/example.css"/>
<link rel="shortcut icon" type="image/x-icon" href="../weather.ico"/>
<script type="text/javascript" src="../apikeys.js"></script>
<script type="text/javascript" data-main="src/app" src="bower_components/requirejs/require.js"></script>
<!-- When using Leaflet, make sure to include the Leaflet stylesheet -->
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.2/leaflet.css"/>
</head>
<body>
<div id="map-canvas"></div>
<div id="loading">Loading...</div>
<div class="prompt">
<h1>Example: Using AMD and Bower.js</h1>
<h2>Aeris.js</h2>
<p>
Aeris.js components can all be loaded using an AMD loader (eg. <a href="http://requirejs.org/" target="_blank">Require.js</a>). Take a peek at <code>src/app.js</code> for an example of how to configure Require.js and load Aeris.js AMD modules.
</p>
<p>
<a href="http://bower.io/" target="_blank">Bower.js</a> can be used to automatically download all of the dependencies for Aeris.js. Running <code>bower install</code> from command line will install dependencies in the <code>bower_components</code> directory.
</p>
<small>
<strong>Having trouble?</strong><br />
Make sure you've created an <code>apikeys.js</code> file, with a valid Aeris <code>client_id</code> and <code>client_secret</code>.<br />
You will also need to run <code>bower install</code> from the <code>examples/amd</code> directory in order to download dependencies for Aeris.js
</small>
</div>
</body>
</html>