Tern for PhantomJS

45 views
Skip to first unread message

Dario Sneidermanis

unread,
Oct 24, 2014, 11:58:39 PM10/24/14
to tern...@googlegroups.com
Hello,

Is there a way to make Tern work for node + PhantomJS code?

Thanks,
Dario

Marijn Haverbeke

unread,
Oct 25, 2014, 4:39:47 AM10/25/14
to Dario Sneidermanis, tern-dev
You mean you want node-specific and browser-specific functionality in
one project? In that case, simply load both the browser defs and the
node plugin.

Best,
Marijn
> --
> You received this message because you are subscribed to the Google Groups
> "tern-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tern-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Dario Sneidermanis

unread,
Oct 25, 2014, 4:49:25 AM10/25/14
to Marijn Haverbeke, tern-dev
That was exactly what I meant... It was a really stupid question, sorry haha

Angelo zerr

unread,
Oct 25, 2014, 8:37:06 AM10/25/14
to Dario Sneidermanis, Marijn Haverbeke, tern-dev
Hi Marijn, Dario,

Perhaps Dario whish to have completion for http://phantomjs.org/ 

------------------------------------------------------------
var page = require('webpage').create();
page. // Ctrl+Space shows open
------------------------------------------------------------

To support that, Dario should create a tern-node-phantomjs tern pluginb like I have done for express (by using !node)

Regard's Angelo

Dario Sneidermanis

unread,
Oct 25, 2014, 8:45:31 AM10/25/14
to Angelo zerr, Marijn Haverbeke, tern-dev
Yes, that's what I wanted, but Marijn's suggestion was enough to make it work:

$ cat .tern-project
{
    "libs": [
        "browser",
        "jquery"
    ],
    "plugins": {
        "node": {}
    }
}

I'm using vim + tern + tern_for_vim + YouCompleteMe
Reply all
Reply to author
Forward
0 new messages