- My branch of the p5 web editor connected to Tern: https://github.c
om/kaganjd/p5.js-web-editor/tr ee/autocomplete. To get it up and running, you’d follow steps in the README.
- Code to generate the Tern definition file for the p5.js library: https://github.com/processing/p5-tern.yuidoc. This is set up to be a module dependency of the main p5.js repository and executed with a Grunt task from there.
- Documentation re: errors when running the Tern definition generator code: https://gist.github.com/kaganjd/32c87c49fda5f61b78aa2b88993daca4
- Next steps: https://gist.github.com/kaganjd/1e033541fa00af3e760c0acddf6fc197
The workflow for this whole thing in the wild will be:
- Generate Tern definition file from the main p5.js project by running
- Put the file output of that process, which should be a JSON file and must be named ‘p5.json’, into the p5.js web editor project—specifically,
- Use autocomplete with the web editor!
- A sandboxed example of CodeMirror, React, and Tern: https://github.com/
- As I mentioned above, you have to generate a Tern definition file for the p5.js library. If you want to just get to working on autocomplete without thinking about the Tern file generator part, you can use this: https://gist.github.co
m/kaganjd/c1c88b17063cf53651b0 f2c42218de5c Download the JSON, make sure it’s named ‘p5.json’ and put it in