# tern-meteor

> Tern plugin for meteor js framework

Latest version **1.0.6** (published 2016-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install tern-meteor
pnpm add tern-meteor
yarn add tern-meteor
bun add tern-meteor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-03-15 |
| First published | 2015-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Slava Kim |
| Maintainers | ferhtgoldaraz |
| Keywords | tern, meteor |

## Links

- npm: https://www.npmjs.com/package/tern-meteor
- Repository: https://github.com/ferhtgoldaraz/tern-meteor
- Homepage: https://github.com/ferhtgoldaraz/tern-meteor#readme
- Issues: https://github.com/ferhtgoldaraz/tern-meteor/issues
- npm.io page: https://npm.io/package/tern-meteor

## Dependencies (2)

- [tern](https://npm.io/package/tern.md) ~0.17.0
- [acorn](https://npm.io/package/acorn.md) ~2.5.2

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2016-03-15
- 1.0.5 — 2016-03-15
- 1.0.4 — 2016-03-15
- 1.0.3 — 2015-11-07
- 1.0.2 — 2015-11-07
- 1.0.1 — 2015-11-07
- 1.0.0 — 2015-11-07

## README

*NOTE*: this is a fork from [Slava's](https://github.com/Slava/tern-meteor) work.
I simply wanted to be able to `npm install` it, since that lets `tern` use this
to resolve the plugin in `.tern-project` without futher configuration.
See below for an example.

TernJS plugin: Meteor
===

*UPDATE*: All definitions were update to Meteor 1.0.4. There are probably some
bugs since this project moved to definitions autogeneration, if you notice any
API mismatch, report in the issues.

This is a plugin for [TernJS](http://ternjs.net) bringing support for
[Meteor](https://www.meteor.com) JavaScript Framework. Tested on Vim and Sublime
Text 2/3, reported to work on Emacs, potentially should work on Brackets,
LightTable, [Eclipse](https://github.com/angelozerr/tern.java/wiki/Tern-&-Meteor-support) and any other CodeMirror-based editors.

Checkout my presentation on Meteor Devshop 11: [Videos](https://www.youtube.com/watch?v=Lqcs6hPOcFw#t=6227) and [Slides](https://slid.es/slavakim/meteor).
The mailing thread for this project is [here on meteor-talk](https://groups.google.com/forum/#!searchin/meteor-talk/tern/meteor-talk/b_yGWIqXl7Y/UYsGCGLWu7sJ).

Gif Demos
---

Types based auto-completion:

![tern-vim-completion.gif](/demo-gifs/tern-vim-completion.gif)

Look up documentation:

![tern-vim-doc.gif](/demo-gifs/tern-vim-doc.gif)

Jump to definition:

![tern-vim-jump-to-def.gif](/demo-gifs/tern-vim-jump-to-def.gif)

Jump to references:

![tern-vim-refs.gif](/demo-gifs/tern-vim-refs.gif)

Get types information (on the bottom):

![tern-vim-types.gif](/demo-gifs/tern-vim-types.gif)

Supported features specific to Meteor
---

- each file is wrapped in a scope
- global variable are global project-wise
- interface definitions converted from meteor.ts.d

Todo features
---

- correctly calculate package scope and their exports
- some auto-completion based on Templates names would be nice
- generate docs from docs.meteor.com
- load all Meteor related JS files on the load of any file
- parsing of handlebars template?


Installation for Sublime Text 3
---

[Go and install the separate package for ST3.](https://github.com/Slava/tern-meteor-sublime)

Installation for Vim
---

**[Demo Video of Vim](https://www.youtube.com/watch?v=TIE9ZOqlvFo)**

You check out my Vim setup which is already optimized for Meteor development:
[GitHub repo](https://github.com/Slava/vimrc). Or you can get it to your setup:

- Install [tern-vim plugin](https://github.com/marijnh/tern_for_vim) with your
  favorite package manager for Vim.
- `cd` to `.vim` folder, `tern_for_vim` plugin folder and run `npm install` to
  fetch `tern` npm module.
- Download `meteor.js` file (from this repo) to tern's folder
  `tern_for_vim/node_modules/tern/plugins`.
- In your Meteor project create a file `.tern-project` with the contents similar
  to:

```
    {
      "libs": [
        "browser",
        "jquery",
        "underscore"
      ],
      "loadEagerly": [ "*.js", "*/*.js", "*/*/*.js", "*/*/*/*.js" ],
      "dontLoad": [ ".meteor" ],
      "plugins": {
        "meteor": {}
      }
    }
```

Note: ignore files in `.meteor` folder. Load all JS if possible.

---
_Source: https://npm.io/package/tern-meteor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
