use the lib dir

This commit is contained in:
Chris Anderson 2009-01-02 01:51:40 -08:00
parent b8856771f7
commit d6088be47f
3 changed files with 30 additions and 0 deletions

View file

@ -161,6 +161,7 @@ module CouchRest
def package_views(views, library)
if library
lib = "var lib = #{library.to_json};"
puts lib
views.each do |view, funcs|
apply_lib(funcs, lib) if lib
end

View file

@ -0,0 +1,3 @@
function aHelperFunction() {
return "help";
};

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>Generated CouchApp Form Template</title>
</head>
<body>
<div id="header">
<h2><a href="index.html">Back to index</a></h2>
</div>
<div id="content">
<h1><% doc.title %></h1>
</div>
</body>
<script src="/_utils/script/json2.js"></script>
<script src="/_utils/script/jquery.js?1.2.6"></script>
<script src="/_utils/script/jquery.couch.js?0.8.0"></script>
<script src="jquery.couchapp.js"></script>
<script src="blog.js"></script>
<script type="text/javascript" charset="utf-8">
$.CouchApp(function(app) {
var docid = document.location.pathname.split('/').pop();
// hey you could run a query to load more information from views
});
</script>
<script src="showdown.js"></script>
</html>