0.1.0 • Published 9 years ago

tern-requirejs-extension v0.1.0

Weekly downloads
63
License
MIT
Repository
github
Last release
9 years ago

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, and within a browser.

The easiest way to install tern-requirejs-extension is to use a recent version of npm. In the directory where you installed the tern package, 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 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.