Skip to content

Commit

Permalink
Creating a resources folder for use by examples and API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Apr 4, 2013
1 parent b4ce430 commit 6c5377e
Show file tree
Hide file tree
Showing 53 changed files with 144 additions and 141 deletions.
19 changes: 11 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ def gh_pages(t):
virtual('doc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables))


@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), SRC, SHADER_SRC,
ifind('doc/template'))
@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources',
SRC, SHADER_SRC, ifind('doc/template'))
def jsdoc_BRANCH_timestamp(t):
t.run('%(JSDOC)s', '-c', 'doc/conf.json', 'src', 'doc/index.md',
'-d', 'build/gh-pages/%(BRANCH)s/apidoc')
Expand Down Expand Up @@ -473,26 +473,29 @@ def split_example_file(example, dst_dir):
target_require.close()


@target('host-examples', 'build', 'examples', phony=True)
@target('host-resources', phony=True)
def host_resources(t):
resources_dir = 'build/gh-pages/%(BRANCH)s/resources'
t.rm_rf(resources_dir);
t.cp_r('resources', resources_dir);

@target('host-examples', 'build', 'host-resources', 'examples', phony=True)
def host_examples(t):
examples_dir = 'build/gh-pages/%(BRANCH)s/examples'
build_dir = 'build/gh-pages/%(BRANCH)s/build'
t.rm_rf(examples_dir)
t.makedirs(examples_dir)
t.rm_rf(build_dir)
t.makedirs(build_dir)
t.cp(EXAMPLES, 'examples/examples.css', examples_dir)
t.cp(EXAMPLES, examples_dir)
for example in [path.replace('.html', '.js') for path in EXAMPLES]:
split_example_file(example, examples_dir % vars(variables))
t.cp_r('examples/data', examples_dir + '/data')
t.cp_r('examples/bootstrap', examples_dir + '/bootstrap')
t.cp_r('examples/font-awesome', examples_dir + '/font-awesome')
t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js')
t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js',
'build/ol.css', build_dir)
t.cp('examples/index.html', 'examples/example-list.js',
'examples/example-list.xml', 'examples/Jugl.js',
'examples/jquery.min.js', 'examples/social-links.js', examples_dir)
'examples/jquery.min.js', examples_dir)
t.rm_rf('build/gh-pages/%(BRANCH)s/closure-library')
t.makedirs('build/gh-pages/%(BRANCH)s/closure-library')
with t.chdir('build/gh-pages/%(BRANCH)s/closure-library'):
Expand Down
8 changes: 4 additions & 4 deletions doc/template/tmpl/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
<link rel="stylesheet" href="../examples/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../examples/examples.css" type="text/css">
<link rel="stylesheet" href="../examples/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
</head>

<body>
Expand Down Expand Up @@ -49,6 +49,6 @@ allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"></
</div>

<script> prettyPrint(); </script>
<script src="../examples/social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Animation example</title>
</head>
<body>
Expand Down Expand Up @@ -57,7 +57,7 @@ <h4 id="title">Animation example</h4>
</div>

<script src="loader.js?id=animation" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/bind-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Bind HTML input example</title>
</head>
<body>
Expand Down Expand Up @@ -81,7 +81,7 @@ <h4 id="title">Bind HTML input example</h4>
</div>

<script src="loader.js?id=bind-input" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/bing-maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Bing Maps example</title>
</head>
<body>
Expand Down Expand Up @@ -56,7 +56,7 @@ <h4 id="title">Bing Maps example</h4>

<script src="jquery.min.js" type="text/javascript"></script>
<script src="loader.js?id=bing-maps" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/brightness-contrast.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Brightness/contrast example</title>
</head>
<body>
Expand Down Expand Up @@ -59,7 +59,7 @@ <h4 id="title">Brightness/contrast example</h4>
</div>

<script src="loader.js?id=brightness-contrast" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/canvas-tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Canvas tiles example</title>
</head>
<body>
Expand Down Expand Up @@ -49,7 +49,7 @@ <h4 id="title">Canvas tiles example</h4>
</div>

<script src="loader.js?id=canvas-tiles" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/epsg-4326.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>EPSG:4326 example</title>
</head>
<body>
Expand Down Expand Up @@ -49,7 +49,7 @@ <h4 id="title">EPSG:4326 example</h4>
</div>

<script src="loader.js?id=epsg-4326" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/export-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Export map example</title>
</head>
<body>
Expand Down Expand Up @@ -51,7 +51,7 @@ <h4 id="title">Export map example</h4>
</div>

<script src="loader.js?id=export-map" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
10 changes: 5 additions & 5 deletions examples/geolocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style>
.icon-flag {
font-size: 22px;
Expand Down Expand Up @@ -56,9 +56,9 @@ <h4 id="title">Geolocation example</h4>
</div>

<script src="jquery.min.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../resources/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="loader.js?id=geolocation" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/hue-saturation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Hue/saturation example</title>
</head>
<body>
Expand Down Expand Up @@ -59,7 +59,7 @@ <h4 id="title">Hue/saturation example</h4>
</div>

<script src="loader.js?id=hue-saturation" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style>
.example {
height: 140px;
Expand Down Expand Up @@ -209,7 +209,7 @@

</div>

<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/mapquest.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>MapQuest example</title>
</head>
<body>
Expand Down Expand Up @@ -49,7 +49,7 @@ <h4 id="title">MapQuest example</h4>
</div>

<script src="loader.js?id=mapquest" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/mouse-position.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Mouse position example</title>
</head>
<body>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h4 id="title">Mouse position example</h4>
</div>

<script src="loader.js?id=mouse-position" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style type="text/css">
.overlay {
display: none;
Expand Down Expand Up @@ -111,7 +111,7 @@ <h4 id="title">Overlay example</h4>
</div>

<script src="loader.js?id=overlay" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
8 changes: 4 additions & 4 deletions examples/preload.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="examples.css" type="text/css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Preload example</title>
</head>
<body>
Expand Down Expand Up @@ -52,7 +52,7 @@ <h4 id="title">Preload example</h4>
</div>

<script src="loader.js?id=preload" type="text/javascript"></script>
<script src="social-links.js" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>

</body>
</html>
Loading

0 comments on commit 6c5377e

Please sign in to comment.