js.core: Remove the -builtin_vdlroot flag.

The vdl tool needs access to its standard packages when compiling
and generating code.  It can either find the packages under
VDLROOT/JIRI_ROOT, or it can use the packages built-in to the
tool itself.

The previous behavior was that if -builtin_vdlroot=false (the
default), we'd always look under VDLROOT or JIRI_ROOT.  The new
behavior gets rid of the flag, and changes the behavior as if it
were set to true.  If VDLROOT or JIRI_ROOT are set, we always use
that value, otherwise we extract the built-in vdlroot to a
temporary directory.

The previous behavior was to write out the data as a
base64/gzipped/tarball with line breaks.  The new behavior writes
out a gzipped/tarball as raw binary data, without line breaks.
This is simpler; there's no need for the base64 encoding.

The previous behavior only included *.vdl files in the tarball;
we also need to include vdl.config files, since they affect code
generation for dependant packages.

Added an explicit test to make sure the builtin vdlroot data
contains exactly what we expect; the net result is similar to the
go-generate test (which reminds us when we've forgotten to run
go-generate), but is a bit more localized.

MultiPart: 4/6

Change-Id: I9044e185384785bdc8a8f15a3a95940d4cece84b
2 files changed
tree: 82371cf7b12b155485bff312751a80ff7e65fd42
  1. extension/
  2. go/
  3. jsdocs/
  4. src/
  5. test/
  6. .gitattributes
  7. .gitignore
  8. .jshintignore
  9. .jshintrc
  10. .npmignore
  11. AUTHORS
  12. CONTRIBUTING.md
  13. CONTRIBUTORS
  14. LICENSE
  15. Makefile
  16. package.json
  17. PATENTS
  18. README.md
  19. VERSION
README.md

Vanadium JavaScript

This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.

Install

npm install --save vanadium/js

Usage

The entry point to the API is through a module called vanadium, everything else is considered private and should not be accessed by the users of the API.

The vanadium module is exported as a global in the browser JavaScript library and for Browserify and Node.js the “main” property in the package.json points to /src/vanadium making it the index module and therefore Browserify and Node.js users can gain access to the API with:

var vanadium = require("vanadium");

One of the goals of this project is to only write the code once and have it run in both Node.js and browsers. Therefore, specific build and testing steps have been designed in the project to ensure this goal.

When run in a browser, vanadium.js expects that the vanadium extension will be installed.

Bugs and feature requests

Bugs and feature requests should be filed in the Vanadium issue tracker.

Building and testing

GNU Make is used to build and test Vanadium.

Build everything:

make build

Test everything:

make test

Run a specific test suite:

make test-unit
make test-unit-node
make test-unit-browser

make test-integration
make test-integration-node
make test-integration-browser

Remove all build and testing artifacts:

make clean