Git Product home page Git Product logo

api-viewer's Introduction

Manual install for the DTK API documentation tool
--------------------------------------------------

Requirements:
PHP 5.2 or higher
Apache with mod_rewrite enabled

For uploading and processing documentation XML files:
PHP XSL module enabled
PHP cURL module enabled

Instructions to run the site:
Create a virtual host in Apache, and allow Overrides in the definition.

Place the entire API site in the directory where you are pointing the vhost.

Set the permissions on the /data directory to be writable; it should have the
ability to not only write directly to that directory, but to also create sub-
directories and write to them as well.

Open the config.php file, and edit with your specific information (including the
_base_url variable; leave this to be "/" if you are running in the root of a
vhost).  Note that modules to be displayed should all have a value of "-1" (this
is set by the class tree generator), and should be in the order in which you want
the modules to appear within the class tree.

If you are just running the site with the included XML files, that should be 
all there is to running the site; just hit your vhost and go.


Generating the documentation files from your source
---------------------------------------------------

1. get latest Node.js from http://nodejs.org/#download

2. check out js-doc-parse from bill (it has tree.json generation code)

	$ git clone --recursive https://github.com/wkeese/js-doc-parse.git
	$ cd js-doc-parse
	$ git checkout tree

3. edit config.js to give path to dojo (your path may vary from example below):

MacOS:
	environmentConfig: {
		basePath: '../trunk/',
		packages: {
			dojo: 'dojo',
			dijit: 'dijit',
			dojox: 'dojox',
			doh: 'util/doh'
		},
		...
	}

Windows:

	environmentConfig: {
		basePath: 'c:\\users\\me\\trunk\\',
		packages: {
			dojo: 'dojo',
			dijit: 'dijit',
			dojox: 'dojox',
			doh: 'util/doh'
		},
		...
		excludePaths: {
		  ...
      		    /\\(?:tests|nls|demos)\\/,
            ...
		}
	}


4. run parser on dojo source

MacOS:

    $ ./parse.sh ../trunk/dojo ../trunk/dijit ../trunk/dojox

Windows:

  C:\> parse.bat c:\\users\\me\\trunk


This will generate details.xml and tree.json.


5. move files here

Create data/1.8 directory (or whatever the current version is), and move the details.xml and tree.json there.


Theming your API documentation tool
-----------------------------------

TODO

Implementation Notes
--------------------
PHP files:
	- generate.php - utility methods
	- spider.php - used to pre-cache web static HTML versions of pages

The data files are:
	- details.xml - main information about modules
	- tree.json - just the metadata needed to display the tree of modules

api-viewer's People

Contributors

ttrenka avatar wkeese avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.