Hacker News new | ask | show | jobs
by scottaj2 3801 days ago
>Tern supports node.js module loading so this should work across modules.

This hasn't been my experience. I've tried various term commands and configuring tern to do things like eagerly loading project files, but it still only works for me in a single file. Do you have any links to docs on how to do this?

2 comments

I literally just installed tern in atom a few minutes ago and it works. This is the .tern-project file I generated, but I have no idea if it's optimal.

{ "ecmaVersion": 6, "libs": [], "loadEagerly": [ "node_modules/lodash" ] }

I'm definitely getting lodash method lookups and they work well.

I hear it's not a good idea to throw all of node_modules at tern -- but the same applies for WebStorm.

Cool! I'll try tweaking my config tonight to see if i can have more success.
I just added a .tern-project file to load the "node" plugin to my node.js project skeleton http://i.imgur.com/yh4tphx.png

My whole dotemacs (including skeleton) is here https://github.com/wcummings/dotemacs