I am going to create a language specific tool to support hight-lighting, code completion etc and found ternjs is a good framework to use. I read the document from http://ternjs.net/doc/ but not quite understand how it works. Based on that document ternjs needs a server to be launched to support the client side. I inspected the on line demo from http://ternjs.net/doc/demo/#simple. When I type command in this demo, I didn't see any http communication happens between my browser and the ternjs server. I am confused about how ternjs server work in this case. Is there a way for me to setup one locally?
Asked
Active
Viewed 240 times
1
-
"Tern is a stand-alone code-analysis engine for JavaScript. It is intended to be used with a code editor plugin to enhance the editor's support for intelligent JavaScript editing." - I thought this is obvious? – Mox Jan 09 '17 at 08:27
-
there is no server communication required. it all happens on the client's machine – Mox Jan 09 '17 at 08:28
-
If it is a stand-alone application, why does the document say something about ternjs server? Is there an example for me to setup locally? – Joey Yi Zhao Jan 09 '17 at 08:33
-
from my understanding is that, ternjs is a js library. so you will need a server to serve the file to the client browser. but it does not mean that ternjs requires server communication to use. to set it up locally, just install it via nodejs and import it into the page you intend to use. run the server, and you will be able to see it. – Mox Jan 09 '17 at 08:37
-
anyway the doc is ambiguous with what is being demonstrated on their website. – Mox Jan 09 '17 at 08:40