add tern as npm setup.