reader: cleans up Syncbase code and interaction.

Since Vanadium and Syncbase setup is asynchronous and has multiple levels of
"readiness" the interaction between "state" and Syncbase APIs been moved out of
individual component code and into the top-level application logic in
browser/main.js. As a result:

* All state updates and syncbase interactions can exist in a single place.
* Components can only be responsible for defining their state and UI.

File blobs are now stored in Syncbase and the pdf-store has been removed. As a
result the routes have been emptied out since the APIs they used to call no
longer exist. There is still clean up and features to add:

* SyncGroup setup and interaction will be addressed via #16
* Route setup will be re-addressed as #17 is implemented.

Closes #13

Change-Id: I4ef1599927e446efe5c94fc12c9e7ede60ccb80b
17 files changed
tree: 9b72914027579e9f9137d26fcb323361269cddd5
  1. bin/
  2. browser/
  3. lib/
  4. public/
  5. test/
  6. .gitignore
  7. .jiriignore
  8. .jshintignore
  9. .jshintrc
  10. AUTHORS
  11. CONTRIBUTING
  12. CONTRIBUTORS
  13. LICENSE
  14. Makefile
  15. package.json
  16. PATENTS
  17. README.md
  18. VERSION
README.md

Reader

An example PDF reader using Vanadium.

Development

Dependencies

If you have a $JIRI_ROOT setup you can install Node.js from $JIRI_ROOT/third_party by running:

v23 profile install nodejs

Optionally, it is possible to use your own install of Node.js if you would like to use a more recent version.

Building

The Makefile is setup to handle all dependencies once Node.js is installed. The default make task will install any modules listed in the package.json and build a browser bundle from browser/index.js via browserify.

make

It is possible to have the build happen automatically anytime a JavaScript file changes using the watch tool:

watch make

Running locally

To run a local dev server use:

make start

If you would like to change the host and or port that is used:

make start port=<port> host=<host>

Run syncbase with:

make syncbase

This will automatically have you set up credentials etc. If you want to remove stored data & credentials use:

make clean