Jeff Burke | e29f2af | 2012-12-08 12:15:22 -0800 | [diff] [blame] | 1 | NDN.JS: A javascript client library for Named Data Networking |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 2 | ------------------------------------------------------------- |
Jeff Burke | 0f418d0 | 2012-12-08 12:14:41 -0800 | [diff] [blame] | 3 | |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 4 | BASIC LIBRARY: NO BUILD REQUIRED |
| 5 | ================================ |
Jeff Burke | acb3b3d | 2012-12-08 12:17:41 -0800 | [diff] [blame] | 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 Helper.js to have it load all of |
| 8 | the scripts. |
Jeff Burke | 0f418d0 | 2012-12-08 12:14:41 -0800 | [diff] [blame] | 9 | |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 10 | BUILD A COMBINED, COMPRESSED LIBRARY |
| 11 | ==================================== |
| 12 | |
Jeff Burke | e29f2af | 2012-12-08 12:15:22 -0800 | [diff] [blame] | 13 | A more efficient way to include the library is to used the combined, compressed library |
| 14 | ndn-js.js that can be made using the js/tools/build/make-js.sh script. See the README in |
| 15 | that directly. 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 using the script if |
| 17 | possible. |
| 18 | |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 19 | To create a combined and optionally compressed version of NDN.JS scripts: |
| 20 | |
Alexander Afanasyev | 426174a | 2013-03-13 16:45:47 -0700 | [diff] [blame] | 21 | ./waf configure --no-ws --prefix=<PREFIX_TO_INSTALL_JS> |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 22 | ./waf install |
| 23 | |
| 24 | These commands will create a combined version, combined version compressed using Google's |
| 25 | Closure Compiler, and install it into <PREFIX_TO_INSTALL_JS> folder. |
| 26 | |
| 27 | The compressed version is what we recommend including in applications. |
| 28 | |
Jeff Thompson | 232f289 | 2013-07-29 15:38:16 -0700 | [diff] [blame] | 29 | DOCUMENTATION |
| 30 | ================ |
| 31 | The documentation is auto-generated using JSDoc. If you don't have JSDoc installed, download and unzip from: |
| 32 | https://github.com/jsdoc3/jsdoc/archive/master.zip |
| 33 | |
| 34 | To make doc, cd to the root directory of ndn-js and run the following command to put the output in subdirectory doc: |
| 35 | <path-to-jsdoc>/jsdoc --recurse --destination doc js |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 36 | |
| 37 | WEBSOCKETS PROXY |
| 38 | ================ |
| 39 | |
Jeff Burke | e29f2af | 2012-12-08 12:15:22 -0800 | [diff] [blame] | 40 | If you wish to run your own WebSockets proxy instead of using the NDN testbed, you must |
| 41 | build and install Node.js (often on the machine also running the ccnd you wish to proxy |
Jeff Burke | 9c950af | 2012-12-08 12:18:54 -0800 | [diff] [blame] | 42 | for, but that doesn't have to be the case). See wsproxy/README.md |
Jeff Burke | 0f418d0 | 2012-12-08 12:14:41 -0800 | [diff] [blame] | 43 | |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 44 | THE FIREFOX ADD-ON |
| 45 | ================== |
| 46 | |
Alexander Afanasyev | 426174a | 2013-03-13 16:45:47 -0700 | [diff] [blame] | 47 | Build first compressed version of NDN.js |
| 48 | |
| 49 | ./waf configure |
| 50 | ./waf |
| 51 | |
| 52 | Then go to ndnProtocol and run ./make-ndnProtocol.sh which makes ndnProtocol.xpi. |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 53 | |