qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

JSDoc Support #102

Closed tresf closed 8 years ago

tresf commented 8 years ago

Support for generating API documents based on the JavaScript markup.

Example markup: js/qzTray.js#L552

Tagging @Lukas-W

tresf commented 8 years ago

I used a slightly dated version of JSDoc (2.6 available in the Ubuntu 12.04 repos) against js/qzTray.js and the docs seem to be quite nice.

@bberenz should we be using type or typedef for some of the custom objects?

image

akberenz commented 8 years ago

I've made some adjustments to the docs, so all of the namespaces and functions available should show up now on the generated pages. Not sure if you want the generated docs in this repo or not though.

tresf commented 8 years ago

Not sure if you want the generated docs in this repo or not though.

Our goal is to create a trigger to publish them directly to the website. Can you offer the method you're using to generate them, then we can start working on a deploy script. (So no, not in the qz-print repo).

akberenz commented 8 years ago

I have a separate NodeJS project folder with JSDoc installed, and run the command file provided there on the qz-tray javascript file. Not sure if there is a better alternative that fits how you want to handle this.

tresf commented 8 years ago

Not sure if there is a better alternative that fits how you want to handle this

We don't use Node on our web server currently, but we'd be happy to add it once we find a add a good ppa for it on our Ubuntu server. Can you just paste the commands you're using to generate so we can replicate? They may seem obvious, but it will save a few minutes on our end as well as ensure we're using the same commands.

akberenz commented 8 years ago

JSDoc states it as /path/to/jsdoc yourSourceCodeFile.js For me that's ...\IdeaProjects\extra\node_modules\.bin\jsdoc ...\IdeaProjects\qz-print\js\qz-tray.js And then the docs are created in an out folder at the current directory

tresf commented 8 years ago

I've started this...

Ubuntu 12.04 has a very old version of Node which first must be uninstalled.

sudo apt-get --purge nodejs
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs # this will also install npm
sudo npm install -g jsdoc

Cron script is completed and will be uploaded momentarily.

tresf commented 8 years ago

Closed via https://qz.io/api/. This will update nightly.