-
• #2
I know it's been a while, but did you ever get your JSDoc generator to a working state? I am wanting to use WebStorm for Espruino currently instead of the Web IDE.
Edit: Nvm sorry for reviving, I see now I can already directly add espruino from directly within WebStorm
Going back to a post from a few days ago under the command-line topic
We were talking about tern and WebStorm and JSDoc.
You pointed me at the files on http://www.espruino.com/json, especially the
espurino.json
tern file.I have since written a
node
script that parses this file, and reads the appropriate*.json
file for a nominated board (as per the WebIDE tern.js plugin) and produces a comprehensive 'library' stub file along with boardpins
anddevices
complete with all corresponding JSDoc annotations. Please see attached for an example for the Pico.So this is completely generated. There are only 3 rewrite rules in the script, each of a very generic nature, that deal with a few impedance mismatches between
tern
andJSDoc
formats.This JSDoc library is working very nicely with WebStorm. I'll send some screen shots later.
Hopefully this would be useful to anyone using an editor that requires this format, not only WebStorm.
At the moment the script is probably a bit brittle re: any changes in the
*.json
files, so I'd like to nurse it a little more before making it available.1 Attachment