tern-jasmine


Ⅰ. 插件描述

A Tern plugin adding Jasmine support.

Ⅱ. 基本信息

创建日期:  2014-12-29
使用用户:  1
Github星:  4
插件作者:  Angelo

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'angelozerr/tern-jasmine'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'angelozerr/tern-jasmine'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'angelozerr/tern-jasmine'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/angelozerr/tern-jasmine

Ⅳ. 文档说明

# tern-jasmine

Build Status
NPM version

tern-jasmine is a plugin which adds support for Jasmine to the JavaScript code intelligence system Tern.

Installation

tern-jasmine works with the NodeJS Tern Server, and within a browser.

Short version

After installing Tern according the setup instructions of your desired [editor
plugin](http://ternjs.net/doc/manual.html#editor), go to the place where the Tern package was
installed (or the Tern repo was cloned) and run

$ npm install tern-jasmine

Or, if you're not sure where Tern was installed, you can try

$ npm install -g tern-jasmine

Long version

See INSTALL.md for instructions tailored to each editor.

Configuration

In order for Tern to load the tern-jasmine plugin once it is installed, you must
include jasmine in the plugins section of your [Tern configuration
file](http://ternjs.net/doc/manual.html#configuration). The configuration file can be either a file named
.tern-project in your project's root directory, or .tern-config in your home
directory.

Here is a minimal example .tern-project configuration file:

{
  "ecmaVersion": 5,
  "libs": ["browser"],
  "plugins": {
    "jasmine": {}
  }
}

"Project directory" and .tern-project vs .tern-config

Tern looks for .tern-project first, walking up the directory tree, and uses
its location as the "project directory". If no .tern-project is found, your
.tern-config is loaded instead, and *the working directory of the Tern server
process is used as the "project directory"*.

Related projects

Structure

The basic structure of the project is given in the following way:

  • jasmine.js the tern plugin.
  • demos/ demos with jasmine tern plugin which use CodeMirror.
  • test test of the tern plugin.

添加新评论