Skip to content

angelozerr/tern-requirejs-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tern-requirejs-extension

Build Status NPM version

tern-requirejs-extension is a plugin which adds support validation for requirejs require to the JavaSript code intelligence system Tern.

Here a sample with Eclipse :

RequireJS lint

See here for more information about requirejs lint with Eclipse.

Installation

tern-requirejs-extension works with the RequireJS [Tern Server][tern-server], and within a browser.

The easiest way to install tern-requirejs-extension is to use a recent version of [npm][npm]. In the directory where you installed the [tern package][tern-npm], simply run

$ npm install tern-requirejs-extension

Configuration

requirejs-extension tern plugin extends requirejs tern plugin to support validation.

With Node.js

In order for Tern to load the tern-requirejs-extension plugin once it is installed, you must include requirejs-extension in the plugins section of your [Tern configuration file][tern-config] and requirejs.

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

{
  "plugins": {
    "requirejs": {},
    "lint": {},
    "requirejs-extension": {}
  }
}

With WebBrowser (CodeMirror)

See demos/requirejs-lint.html

Structure

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

  • requirejs-extension.js the tern plugin.
  • demos/ demos with requirejs lint tern plugin which use CodeMirror.