This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
INSTALL
67 lines (47 loc) · 2.67 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
NDN-JS: A javascript client library for Named Data Networking
-------------------------------------------------------------
BASIC LIBRARY: NO BUILD REQUIRED
================================
The basic NDN-JS library does not need to be "built". To use the library in the
browser, include build/ndn.js. See the examples in examples/browser.
To use the library in Node.js, require index.js at the top of the distribution tree.
See the examples programs in examples/node.
BUILD A COMBINED, COMPRESSED LIBRARY
====================================
While the combined file ndn.js is useful for debugging, a more efficient way to include the library
is to used the combined, compressed library build/ndn.min.js.
While we try to keep a built version in that directory for convenience, it
may fall out of sync with the library, so we recommend building it as follows if possible.
To build ndn.min.js, Java must be installed.
To create a combined and compressed versions of NDN-JS scripts:
./waf configure
./waf
These commands will create a combined version build/ndn.js, and combined version build/ndn.min.js, compressed
using Google's Closure Compiler.
The compressed version is what we recommend including in applications.
DOCUMENTATION
=============
The documentation is auto-generated using JSDoc. If you don't have JSDoc installed, in a terminal enter:
sudo npm install -g jsdoc
To make documentation, cd to the root directory of ndn-js and run the following command to put the output in subdirectory doc:
npm run doc
WEBSOCKETS PROXY
================
If you wish to run your own WebSockets proxy instead of using the NDN testbed, you must
build and install Node.js (often on the machine also running the ndnd you wish to proxy
for, but that doesn't have to be the case). See wsproxy/README.md
THE FIREFOX ADD-ON
==================
To use the Firefox Add-On, you don't need to build it. To install, in Firefox, open
Tools > Add-ons. In the "gear" or "wrench" menu, click Install Add-on From File and open
ndn-protocol.xpi. (In Firefox for Android, type file: in the address bar and click the
downloaded ndn-protocol.xpi.) Restart Firefox.
If you want to build ndn-protocol.xpi, first build ndn.min.js, the compressed version of NDN.js.
To build ndn.min.js, Java must be installed.
./waf configure
./waf
Then go to the ndn-protocol directory and run ./make-ndn-protocol.sh which makes ndn-protocol.xpi in the top directory.
Firefox now requires add-ons to be signed, but for development you can temporarily disable this as follows:
* Type about:config into the URL bar in Firefox
* In the Search box type xpinstall.signatures.required
* Right-click and select "Toggle" to set it to false