My approach to this problem, with some optional bits:
1. Have your dev copy of Tern in some directory tern_dev_dir (with deps installed via `npm install`)
2. Put some sample code that you want to test on in some directory test_project_dir (since I work on
tern-closure I use a clone of
closure-library).
3. Put a .tern-project file in test_project_dir with whatever configuration you're interested in
4. In test_project_dir, start the server in your dev dir manually (something like `node <path_to_tern_dev_dir>/bin/tern --persistent --port 8001 --verbose`)
5. Open your editor in test_project_dir
Really helpful additions:
node-inspector allows you to use the Chrome debugger to set breakpoints, etc in a running server (you have to start it first by running node-inspector in another shell)
nodemon can automatically restart your server after you make changes to Tern or your plugin
Used together, the command from above is more like:
nodemon --debug --ignore . --watch directory_to_watch <path_to_tern_dev_dir>/bin/tern -- --persistent --port 8001 --verbose