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 | |
| 29 | |
| 30 | WEBSOCKETS PROXY |
| 31 | ================ |
| 32 | |
Jeff Burke | e29f2af | 2012-12-08 12:15:22 -0800 | [diff] [blame] | 33 | If you wish to run your own WebSockets proxy instead of using the NDN testbed, you must |
| 34 | 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] | 35 | 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] | 36 | |
Alexander Afanasyev | 57dce8b | 2013-02-28 19:20:21 -0800 | [diff] [blame] | 37 | THE FIREFOX ADD-ON |
| 38 | ================== |
| 39 | |
Alexander Afanasyev | 426174a | 2013-03-13 16:45:47 -0700 | [diff] [blame] | 40 | Build first compressed version of NDN.js |
| 41 | |
| 42 | ./waf configure |
| 43 | ./waf |
| 44 | |
| 45 | 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] | 46 | |