NativeScript RxDB Plugins are a set of plugins that enable RxDB support for NativeScript. This set of plugins includes a core plugin and adapters for different databases.
The core plugin provides the compatibility layer for RxDB to work with NativeScript. This plugin is a prerequisite for using any of the other plugins.
NativeScript RxDB Plugins also provide adapters for different databases to work with NativeScript, including:
- @herefishyfish/nativescript-lokijs-adapter
- @herefishyfish/nativescript-md5
- @herefishyfish/nativescript-pouchdb-sqlite-adapter
- @herefishyfish/nativescript-sqlite-rxstorage-adapter
- @herefishyfish/requery-sqlite
- Install the core plugin using npm:
npm i @herefishyfish/nativescript-rxdb
-
Install the adapter you want to use.
-
Refer to the RxDB documentation for how to use RxDB.
You can check out the demos within this repo
nx run demo-angular:[android|ios]
or on stackblitz
This workspace manages the suite of plugins listed above.
In general, when in doubt with what to do, just npm start
.
npm run add
At the prompt, enter the name of the new package.
- This adds a plugin harness in
packages
with the necessary boilerplate to just start developing - Updates all demo app flavors to support demoing the new package
- Adds shared code in
tools/demo
where you can write demo code once and share across all demo flavors - Updates build tooling to support the new package
- Updates the
npm start
interactive display - Updates the README here to list the new package
npm run add-angular
At the prompt, enter the name of the package to add an angular
folder to it with the necessary boilerplate to provide Angular support to the package.
npm start
- Choose the focus commands for the package you wish to focus on and hit enter.
- All the demo app's will be updated to isolate that 1 package and for supported IDE's (currently VS Code), the source code will also become isolated in the workspace.
Note: good to always clean the demo you plan to run after focusing. (You can clean any demo from npm start
as well)
npm run publish-packages
- You will be prompted for the package names to publish. Leaving blank and hitting enter will publish them all.
- You will then be prompted for the version to use. Leaving blank will auto bump the patch version (it also handles prerelease types like alpha, beta, rc, etc. - It even auto tags the corresponding prelease type on npm).
- You will then be given a brief sanity check 🧠😊