Global definitions

Posted on
  • I'm developing using WebStorm as the IDE and the espruino command-line tool to push code to the board. This is working great, but the Web IDE has auto-completion information available about the espruino-globals like LED1, Serial1, etc, which WebStorm does not recognize. Where does the IDE get the information from? Where are these actually defined? Would be great if I could get WebStorm to recognize them and stop complaining about unresolved variables and functions.

    Thanks.

  • The definitions come from http://www.espruino.com/json/espruino.js­on, which is in format that works with Tern.

    I think that running this script on the downloaded Espruino source files might come up with a file for you, but it hasn't been changed in a while so I wonder if it still works:

    https://github.com/espruino/Espruino/blo­b/master/scripts/build_jsstub.py

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Global definitions

Posted by Avatar for grayn @grayn

Actions