Browse files

Initial checkin of documentation tools for generating Ti docs with Js…

  • Loading branch information...
Arthur Evans
Arthur Evans committed Aug 9, 2012
1 parent 1410bcd commit 55c60507bb9f83a73251f902daeb89c5ca2ab95c
@@ -0,0 +1,44 @@
+This repository contains build scripts, configuration files, and other miscellany related
+to building the Titanium docs for JsDuck.
+To build the docs, you must have a local clone of this repo, the titanium_mobile repo, and
+the Titanium-flavored JsDuck repo.
+## Initial Setup
+1. Clone all three repos, preferably into the same parent folder (for example, ~/work).
+2. Set the TI_ROOT environment variable to the parent directory of all three repos.
+ TI_ROOT=~/work
+ export TI_ROOT
+ If the repos are in different locations, or use non-default names, you can set
+ environment variables for each repo. See ``.
+3. Make sure you have Ruby installed, and install JsDuck's dependencies:
+ gem install compass
+ gem install rdiscount
+ gem install json
+4. Make sure you have python installed and install pyyaml and Pygments.
+ easy_install pyyaml
+ easy_install Pygments
+5. Export the wiki docs as an Eclise Help archive. Extract the archive and rename the
+ folder to ${DOCTOOLS_DIR}/htmlguides.
+6. If the jsduck_generator has not yet been added to Titanium mobile, obtain a copy of
+ it and place it in the `titanium_mobile/apidoc/generators` folder.
+7. Here goes nothing! Try building the docs:
+ sh
+8. If all goes well, open dist/index.html and see how it looks.
@@ -32,13 +32,12 @@ then
python ${TI_DOCS}/ -f jsduck -o ./build
-python ${JSDUCK}/ --input "./htmlguides/toc.xml" --output "./build/guides"
+python ./ --input "./htmlguides/toc.xml" --output "./build/guides"
-compass compile ${JSDUCK}/jsduck/template/resources/sass
-ruby ${JSDUCK}/jsduck/bin/jsduck --config ./jsduck/jsduck.config
-cp -r "${JSDUCK}/htmlguides/images" "dist/images"
-cp -r "${JSDUCK}/htmlguides/attachments" "dist/attachments"
-cp -r "${JSDUCK}/htmlguides/css/common.css" "dist/resources/css/common.css"
-cp ${JSDUCK}/mock_video.png dist/resources/images/mock_video.png
-cp ${JSDUCK}/codestrong_logo_short.png dist/resources/images/codestrong_logo_short.png
-# cp -r "/landing" "dist/landing"
+compass compile ${JSDUCK}/template/resources/sass
+ruby ${JSDUCK}/bin/jsduck --template ${JSDUCK}/template --config ./jsduck.config
+cp -r "./htmlguides/images" "dist/images"
+cp -r "./htmlguides/attachments" "dist/attachments"
+cp -r "./htmlguides/css/common.css" "dist/resources/css/common.css"
+cp ./resources/mock_video.png dist/resources/images/mock_video.png
+cp ./resources/codestrong_logo_short.png dist/resources/images/codestrong_logo_short.png
@@ -51,7 +51,7 @@ def node2obj(node):
shortname = re.sub('(.*)\.html', '\\1', node.getAttribute('href'))
dirname = shortname
- dir = os.path.join(dest, 'tutorials', dirname)
+ dir = os.path.join(dest, 'guides', dirname)
@@ -95,8 +95,8 @@ def node2obj(node):
# Rewrite any absolute links to
# Only way we can insert a link to the videos in the wiki is to use a full URL
- elif href.startswith('!/video'):
- tag['href'] = href.replace('', '')
+ elif'*#!.*', href):
+ tag['href'] = re.sub('*#!', '#!', href)
# In general, any link back to the wiki is a bad link.
# There are a very few exceptions, such as the community wiki.
@@ -1,12 +1,11 @@
"--title": "Appcelerator Titanium Mobile",
- "--external": "void",
- "--output": "./../dist",
+ "--external": "void,Callback",
+ "--output": "./dist",
"--meta-tags": "meta",
- "--template": "./jsduck/template",
"--welcome": "welcome.html",
"--head-html": "<link rel='stylesheet' href='resources/css/my.css' type='text/css'><link rel='stylesheet' href='resources/css/common.css' type='text/css'>",
- "--guides": "./../tmp/guides/guides.json",
+ "--guides": "./build/guides/guides.json",
"--videos": "./videos.json",
- "--": ["./../tmp/titanium.js"]
+ "--": ["./build/titanium.js"]
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 55c6050

Please sign in to comment.