mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
tweaks and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0da4026b27
commit
30140f0918
17
pwiki2.js
17
pwiki2.js
@ -1,7 +1,6 @@
|
||||
/**********************************************************************
|
||||
*
|
||||
*
|
||||
*
|
||||
* Architecture:
|
||||
* store
|
||||
* page
|
||||
@ -18,12 +17,15 @@
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
* - .load(..) / .json(..) -- for most stores...
|
||||
* might be a good idea to keep a unified format...
|
||||
* - <page>.then() -- resolve when all pending write operations done ???
|
||||
* - an async REPL???
|
||||
*
|
||||
*
|
||||
* XXX BUG: .get('/* /path').raw will return a punch of '/*' copies, should
|
||||
* be the same as .get('/*').match()...
|
||||
* (NOTE: the " " in the pattern is to avoid closing the block comment)
|
||||
*
|
||||
*
|
||||
*
|
||||
***********************************************************************
|
||||
*
|
||||
@ -77,10 +79,6 @@ var pouchdbstore = require('./store/pouchdb')
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Page...
|
||||
|
||||
@ -1732,14 +1730,11 @@ store.next.load(
|
||||
store.update('@file',
|
||||
Object.create(filestore.FileStore))
|
||||
|
||||
// XXX writing to pages in here does not work yet...
|
||||
// p.pwiki.path = '/@pouch/README'
|
||||
// p.pwiki.text = 'PouchDB Store'
|
||||
store.update('@pouch',
|
||||
Object.assign(
|
||||
Object.create(pouchdbstore.PouchDBStore),
|
||||
{
|
||||
__name__: 'data/pouch',
|
||||
__path__: 'data/pouch',
|
||||
}))
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ module.PouchDBStore = {
|
||||
|
||||
// XXX should this be __path__???
|
||||
// ...this sets the path where the store is created...
|
||||
__name__: 'data/pouch',
|
||||
__path__: 'data/pouch',
|
||||
__key_prefix__: 'pwiki:',
|
||||
|
||||
__data: undefined,
|
||||
@ -35,7 +35,7 @@ module.PouchDBStore = {
|
||||
var PouchDB =
|
||||
module.PouchDB =
|
||||
require('PouchDB')
|
||||
return (this.__data = new PouchDB(this.__name__)) }
|
||||
return (this.__data = new PouchDB(this.__path__)) }
|
||||
return this.__data },
|
||||
set data(value){
|
||||
this.__data = value },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user