use the lib dir
This commit is contained in:
parent
b8856771f7
commit
d6088be47f
3 changed files with 30 additions and 0 deletions
|
@ -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
|
||||
|
|
3
lib/couchrest/helper/template-app/lib/helpers/helper.js
Normal file
3
lib/couchrest/helper/template-app/lib/helpers/helper.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
function aHelperFunction() {
|
||||
return "help";
|
||||
};
|
|
@ -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>
|
Loading…
Reference in a new issue