Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10688] CLI: Expose Docgen.py and YAML as Alternative to Markdown in Modules

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-25T20:06:19.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2013 Sprint 13, Release 3.2.0
ComponentsTooling
Labelscore
ReporterDawson Toth
AssigneeJon Alter
Created2011-09-08T07:08:34.000+0000
Updated2013-11-13T21:06:16.000+0000

Description

New Feature

Expose docgen.py / YAML so that our modules' documentation can be rewritten. The docgen.py looks hard coded for use with the core Titanium Mobile, and it isn't packaged up with the SDK.

Example Usage

Take a look at the attached Barcode.yml. If this were included in a module's "documentation" folder, build.py on iOS or ant on Android should generate an index.html etc in the distribution folder. I'm guessing we'll need platform specific tickets for this... let me know. * *validate.py* should be able to be run against module docs that have references to Titanium.* Currently, the module docs need to be copied to the apidoc folder in titanium_mobile so that it can validate without throwing errors that Titanium.* could not be found. I believe if validate.py could accept multiple -d directories it would fix this.

Attachments

FileDateSize
Barcode.yml2011-09-08T07:08:34.000+00003577

Comments

  1. Neeraj Gupta 2012-01-30

    We need to evaluate this support and scope the effort in this sprint so that we can support ACS module documentation for GA.
  2. Arthur Evans 2012-08-28

    Moving back to TIMOB. Not sure what the status of this is currently.
  3. Jon Alter 2013-04-23

    PR

    https://github.com/appcelerator/titanium_mobile/pull/4210

    Testing notes:

    * *New flag in docgen.py -e or --exclude-external. Intended to be used to generate module documentation* Testing: *# in the terminal go to the titanium_mobile/apidoc folder *# Run docgen.py and point to a folder containing some yml documentation (Not Titanium Docs)
       ./docgen.py -f parity -o ../dist/apidoc/ -e ~/Path/To/YML/Doc/Folder
       
    *# This should generate the parity html file in ../dist/apidoc/ and it should only include the documentation from the folder (no Titanium platform docs) * *The 'modulehtml' generator is intended to be used to generate html documentation for modules. Same command as above.* Testing: *# in the terminal go to the titanium_mobile/apidoc folder *# Run docgen.py and point to a folder containing some yml documentation (Not Titanium Docs)
       ./docgen.py -f modulehtml -o ../dist/apidoc/ -e --css styles.css  ~/Path/To/YML/Doc/Folder
       
    *# This should generate the html files in ../dist/apidoc/ for the documentation folder specified and it should only include the documentation from the folder (no Titanium platform docs) * *The module build template has been updated to use docgen.py and and the modulehtml generator to generate module documentation.* Testing: *# Rebuild and install the sdk *# Using the new sdk, create an iOS module *# Create a folder named 'apidoc' in the root of the module *# Add yml documentation to an 'apidoc' folder *# Build the module
    ./build.py
    *# When the build script gets to the doc generation step, it should display an error in the console saying that TI_ROOT has not been set *# Follow the instructions to set the TI_ROOT variable *# Rebuild the module *# Documentation should be added to the module zip in the /documentation/apidocs folder *# Build the module with the --skip-docs flag
    ./build.py --skip-docs
    *# No documentation should be generated in /documentation/apidocs
  4. Ingo Muschenetz 2013-10-25

    Reopened to fix Assignee

JSON Source