-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from jlami/indexeddb
Use pouchdb indexeddb adapter instead of the old idb adapter to use native views.
- Loading branch information
Showing
11 changed files
with
117 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
normalizeEntityName() { | ||
return 'application'; | ||
}, | ||
|
||
filesPath() { | ||
return path.join(this.path, '../pouch-adapter/files'); | ||
}, | ||
|
||
afterInstall(/*options*/) { | ||
this.addPackagesToProject([ | ||
{ name: 'pouchdb-core' }, | ||
{ name: 'pouchdb-adapter-indexeddb' }, | ||
{ name: 'pouchdb-adapter-http' }, | ||
{ name: 'pouchdb-mapreduce' }, | ||
{ name: 'pouchdb-replication' }, | ||
{ name: 'pouchdb-find' }, | ||
{ name: 'relational-pouch' }, | ||
]); | ||
}, | ||
}; |
16 changes: 15 additions & 1 deletion
16
blueprints/pouch-adapter/files/__root__/adapters/__name__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import PouchDB from 'pouchdb-core'; | ||
import PouchDBFind from 'pouchdb-find'; | ||
import PouchDBRelational from 'relational-pouch'; | ||
import indexeddb from 'pouchdb-adapter-indexeddb'; | ||
import HttpPouch from 'pouchdb-adapter-http'; | ||
import mapreduce from 'pouchdb-mapreduce'; | ||
import replication from 'pouchdb-replication'; | ||
|
||
PouchDB.plugin(PouchDBFind) | ||
.plugin(PouchDBRelational) | ||
.plugin(indexeddb) | ||
.plugin(HttpPouch) | ||
.plugin(mapreduce) | ||
.plugin(replication); | ||
|
||
export default PouchDB; |