I just integrated Tern with my editor of choice, and the experience has been pretty incredible so far.
One thing that would make the experience all the more intuitive, however, would be the ability to tap into my existing front- and back-end dependency management systems (i.e. the bower.json
and package.json
files) rather than having to manage the .tern-project
file manually.
Is there some existing way of doing this?
Setting something like this in your .tern-project
should be enough to get it aware of dependencies loaded through your package.json:
{
"plugins": {
"node": {}
}
}
As for bower components, you can follow these steps to get decent completion:
main
js assets from your bower components into a known directory (tools like wiredep are great for this kind of thing).loadEagerly
property.That'd look something like this:
{
"loadEagerly": [
"path/to/Bower/dir/**/*.js"
]
}
If your Bower components really rely on them loading in a specific order, you could either list them in the right order in the loadEagerly
list, or use the simpler approach of concatenating all these Bower components into a single file and just mentioning that in the loadEagerly
list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With