Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 2.24 KB

README.md

File metadata and controls

56 lines (33 loc) · 2.24 KB

tern.yuidoc

Build Status

Generates Tern plugin for :

  • YUI Javascript framework.
  • AlloyUI Javascript framework.

from their Javascript sources by using yuidoc.

and :

  • Liferay Liferay Javascript API (as Liferay is based on AUI, tern.yuidoc hosts too Liferay tern plugin).

Demo

You can see demo :

How it works?

Today tern def generation is done at hand. It should be very cool if grunt tasks will exists.

Any contributions are welcome!

data.json

Generates YUI data.json with yuidoc. Get sources of YUI from GitHub https://github.com/yui/yui3 Set your cd path to src dir

cd /you/path/to/yui3/src

and launch the command :

yuidoc -p 

See http://yui.github.io/yuidoc/args/index.html for more info.

data.json -> tern def

  • Copy you data.json to generator/yui for YUI and generator/aui for AlloyUI.
  • Rename it data.json to yui.data.json.js or aui.data.json.js and add 'var yuiDoc = ' on the top of the file.
  • open yui2tern.html or aui2tern.html to generate tern def from the data.json in the textarea.
  • copy/paste the content of the textarea and replace 'var defs' from the '/plugin/yui.js' or '/plugin/aui.js'

Structure

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

  • demos/ demos with YUI, AlloyUI and Liferay tern plugin which use CodeMirror.
  • generator/ generates YUI and AlloyUI tern plugin from yuidoc data.json by using HTML pages.
  • lib/ lib to transform yuidoc data.json to tern def.
  • plugin/ YUI and AlloyUI tern plugin where defs was generated with lib and Liferay tern plugin.