Jeff Thompson | a6599bf | 2013-08-06 17:05:41 -0700 | [diff] [blame] | 1 | NDN-JS: A javascript client library for Named Data Networking |
| 2 | ------------------------------------------------------------- |
| 3 | |
| 4 | BASIC LIBRARY: NO BUILD REQUIRED |
| 5 | ================================ |
| 6 | The basic NDN-JS library does not need to be "built". For the library, you can manually |
| 7 | include the necessary scripts in a web page or include build/ndn-js.js to have it load all of |
| 8 | the scripts. |
| 9 | |
| 10 | BUILD A COMBINED, COMPRESSED LIBRARY |
| 11 | ==================================== |
| 12 | |
| 13 | While the combined file ndn-js.js is useful for debugging, a more efficient way to include the library |
| 14 | is to used the combined, compressed library build/ndn-js.min.js. |
| 15 | While we try to keep a built version in that directory for convenience, it |
| 16 | may fall out of sync with the library, so we recommend building it as follows if possible. |
| 17 | |
| 18 | To create a combined and compressed versions of NDN-JS scripts: |
| 19 | |
| 20 | ./waf configure |
| 21 | ./waf |
| 22 | |
| 23 | These commands will create a combined version build/ndn-js.js, and combined version build/ndn-js.min.js, compressed |
| 24 | using Google's Closure Compiler. |
| 25 | |
| 26 | The compressed version is what we recommend including in applications. |
| 27 | |
| 28 | DOCUMENTATION |
| 29 | ================ |
| 30 | The documentation is auto-generated using JSDoc. If you don't have JSDoc installed, download and unzip from: |
| 31 | https://github.com/jsdoc3/jsdoc/archive/master.zip |
| 32 | |
| 33 | To make doc, cd to the root directory of ndn-js and run the following command to put the output in subdirectory doc: |
| 34 | <path-to-jsdoc>/jsdoc --recurse --destination doc js |
| 35 | |
| 36 | WEBSOCKETS PROXY |
| 37 | ================ |
| 38 | |
| 39 | If you wish to run your own WebSockets proxy instead of using the NDN testbed, you must |
| 40 | build and install Node.js (often on the machine also running the ccnd you wish to proxy |
| 41 | for, but that doesn't have to be the case). See wsproxy/README.md |
| 42 | |
| 43 | THE FIREFOX ADD-ON |
| 44 | ================== |
| 45 | |
| 46 | First build the compressed version of NDN.js |
| 47 | |
| 48 | ./waf configure |
| 49 | ./waf |
| 50 | |
| 51 | Then go to the ndnProtocol directory and run ./make-ndnProtocol.sh which makes ndnProtocol.xpi in the top directory. |
| 52 | |