commit | f865b45214a9adc23c91c7350eb819d6fe1773e6 | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Wed Nov 18 12:42:18 2015 -0800 |
committer | Todd Wang <toddw@google.com> | Wed Nov 18 12:42:18 2015 -0800 |
tree | 7aab734187574414468dfe276525ee4bfcc147a5 | |
parent | e7ae2c96e2758b3d888081208dfb87757d6cec30 [diff] |
js.core: Remove variable name conflicts from VDL generated Go code The previous VDL generated Go code contained common variable names, such as ctx, opts and err. This meant that users couldn't pick these names for their variables. This CL fixes those cases. Note that we already generate different code for exported interfaces vs. unexported implementations. The interfaces use user-provided variable names, which is better for documentation, while the implementations already avoid conflicts by using generated variables names i0, i1, ... for input args, and similarly o0, o1, ... for output args. This CL ensures the generated interfaces use _ for non-user provided variables, to avoid any possible naming conflict. Fixes v.io/i/912 MultiPart: 4/7 Change-Id: I9254c6d43237e873f8ed3c403892e44de448ed47
This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.
npm install --save vanadium/js
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 should be filed in the Vanadium issue tracker.
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