This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

build funktioniert auch für module

  • Loading branch information...
barbalex committed Sep 11, 2014
1 parent 2edcdc0 commit f2649044135b77db5844c7a8001260269257ca11
View
@@ -1,7 +1,18 @@
var gulp = require('gulp');
return gulp.task('watch', function() {
gulp.watch(['_attachments/*', 'vendor/couchapp/_attachments/*', '-vendor/couchapp/_attachments/main.js', '-vendor/couchapp/_attachments/main2.js', '-vendor/couchapp/_attachments/app.js', '-_attachments/style'], ['dev_src_1', 'dev_src_2']);
gulp.watch([
'_attachments/*',
'-_attachments/style',
'vendor/couchapp/_attachments/*',
'-vendor/couchapp/_attachments/main.js',
'-vendor/couchapp/_attachments/main2.js',
'-vendor/couchapp/_attachments/app.js',
'vendor/couchapp/_attachments/modules/*',
'vendor/couchapp/_attachments/util/*'
],
['dev_src_1', 'dev_src_2']
);
gulp.watch(['_attachments/style/*', '-_attachments/style/main.css', '-_attachments/style/evab.min.css'], ['dev_style']);
// browserify soll wissen, das gewatched wird
global.isWatching = true;
View
@@ -41,6 +41,7 @@
"gulp-util": "~3.0.1",
"pretty-hrtime": "~0.2.1",
"jquery": "~2.1.1",
"pouchdb": "~3.0.5"
"pouchdb": "~3.0.5",
"backbone": "~1.1.2"
}
}
@@ -0,0 +1,22 @@
/**
* Das Modell für einfache Beobachtungen
*/
'use strict';
var _ = require('underscore'),
Backbone = require('backbone'),
PouchDB = require('pouchdb');
var BeobEinfach = Backbone.Model.extend({
idAttribute: "_id"
// get with id
// save with id
// delete with id
});
module.exports = BeobEinfach;
@@ -4,23 +4,22 @@
'use strict';
var PouchDB = require('pouchdb');
var PouchDB = require('pouchdb'),
db = new PouchDB('ab'),
remoteCouch = 'http://barbalex:dLhdMg12@127.0.0.1:5984/evab';
exports.sync = function() {
var db = new PouchDB('ab'),
remoteCouch = 'http://barbalex:dLhdMg12@127.0.0.1:5984/evab';
function sync() {
if (remoteCouch) {
var opts = {live: true};
db.replicate.to(remoteCouch, opts, syncError);
db.replicate.from(remoteCouch, opts, syncError);
}
function sync() {
if (remoteCouch) {
var opts = {live: true};
db.replicate.to(remoteCouch, opts, syncError);
db.replicate.from(remoteCouch, opts, syncError);
}
}
function syncError() {
console.log('error syncing');
}
function syncError() {
console.log('error syncing');
}
exports.sync = function() {
return sync();
};

0 comments on commit f264904

Please sign in to comment.