7. Create a "setenv.bat" file that adds the GIT/bin folder to the command path. In this example
it was:
C:\Program Files (x86)\Git\bin
8. Add into the path the NodeJS entry install directory. In this example it was:
C:\Program Files\nodejs
9. In the extracted dapi directory run the following command which will install the Node.js
modules that are flagged as needed for the dapi tool. The command I used was:
npm -install --production
10. In the dojodocs folder run the following command to download the Dojo doc parser tool
which will be used for parsing the source code:
git clone --recursive https://github.com/wkeese/js-doc-parse.git
11. Change into js-doc-parse directory
12. Edit the "config.js" file and find the entry for "basePath'. Change this to be the root
directory of the extracted Dojo source
13. We are now ready to actually parse the source code to generate the data needed for the dapi
viewer. In my example, I run:
parse.bat "config=./config.js"
14. Create the folder called "dapi/public/data/1.9.2". In my example, the Dojo
source level was "1.9.2".
15. Copy the files called "details.json" and "tree.json" which were generated by the
parsing to the "dapi/public/data/1.9.2" directory.
16. In the dapi folder, edit the file called "config.js" and change the entry for
"defaultVersion" to match your default Dojo code:
defaultVersion: '1.9.2'
…
versions: ['1.9.2']
17. Edit the "dapi/config.js" file to change the URL from which Dojo is loaded. This is
the dojo used by the web page itself. The property to be changed is called "dojoBase".
18. In the dapi folder run the Node.js tool to open the application called "app.js". This will
start the local web server listening on port 3000 (by default). The command used in this
example was:
node app.js
19. Open a browser to "http://localhost:3000/api".
Adding GridX documentation for off-line viewing
<TBD>
Page 137
Kommentare zu diesen Handbüchern