Skip to content
Browse files

change couchapp dependency.

do not use require('couchapp'), but use require('sunrise').couchapp in applications.
  • Loading branch information...
1 parent 405f806 commit f8865b44b8e69d6156ada4a0542d27bb36baf874 @yssk22 committed May 22, 2011
Showing with 5 additions and 4 deletions.
  1. +0 −1 apps/posts/app.js
  2. +1 −1 apps/system/app.js
  3. +1 −1 lib/app.js
  4. +1 −1 skeletons/app/app.js
  5. +2 −0 skeletons/site/app.js
View
1 apps/posts/app.js
@@ -1,6 +1,5 @@
var path = require('path');
var couchapp = require('sunrise').couchapp;
-
var ddoc = {
_id: "_design/posts" ,
name: 'Posts',
View
2 apps/system/app.js
@@ -1,5 +1,5 @@
var path = require('path');
-var couchapp = require('couchapp');
+var couchapp = require('sunrise').couchapp;
var ddoc = {
_id: "_design/system" ,
version: require('sunrise').version,
View
2 lib/app.js
@@ -6,7 +6,6 @@
*/
var path = require('path'),
fs = require('fs');
-var couchapp = require('couchapp');
var staticProvider = require('express').static;
var compiler = require('./middleware/compiler');
@@ -101,6 +100,7 @@ function makeApp(apppath, options){
};
app.deploy = function(cb){
+ var couchapp = require('./sunrise').couchapp;
var url = app.db.url;
couchapp.createApp(ddoc, url, function(a){
app.db.exists(function(err, exists){
View
2 skeletons/app/app.js
@@ -1,5 +1,5 @@
var path = require('path');
-var couchapp = require('couchapp');
+var couchapp = require('sunrise').couchapp;
var ddoc = {
_id: "_design/myapp" ,
version: require('sunrise').version,
View
2 skeletons/site/app.js
@@ -14,6 +14,8 @@ module.exports = ddoc;
// site initialize script
ddoc.init = function(site){
+ var utils = require('sunrise').utils;
+ require('sunrise').appPaths.push(utils.abspath('./apps'));
site.get('/', function(req, res, next){
res.render('index');

0 comments on commit f8865b4

Please sign in to comment.
Something went wrong with that request. Please try again.