TBR reader: adds CSS preprocessing and locally stored PDFs

Adds build tools to preprocess CSS via a browserify transform. This allows CSS
to be created alongside it's corresponding component modules for state creation
and rendering. The pre-processor is based on the one in $V23_ROOT/www and a few
of the basic styles have been copied over.

PDF files can now be stored locally so that they persist between page reloads. A
router was added (based on $V23_ROOT/release/projects/playground/client) to help
support this since some state/input needs to come from the url bar and the
history API.

* Renamed browser/index.js to browser/main.js.
* Moved page-control into pdf component since they are naturally coupled.
* Moved file-picker into footer component.
* Added events/click module.

Change-Id: Ia5885f18bba9bc49c2b42eb6366c1935bea8531a
34 files changed
tree: 4c3a27486359d320e4e184efdc5376960378a047
  1. browser/
  2. lib/
  3. public/
  4. test/
  5. .gitignore
  6. .jshintignore
  7. .jshintrc
  8. .v23ignore
  9. AUTHORS
  10. CONTRIBUTORS
  11. LICENSE
  12. Makefile
  13. package.json
  14. PATENTS
  15. README.md
  16. VERSION
README.md

Reader

An example PDF reader using Vanadium.

Development

Dependencies

If you have a $V23_ROOT setup you can install Node.js from $V23_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>