• 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 board pins and devices 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 and JSDoc 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

About

Avatar for Snerkle @Snerkle started