Git Product home page Git Product logo

Comments (6)

paulvi avatar paulvi commented on June 15, 2024

👍

How much time does it takes for a module?

from tern.java.

angelozerr avatar angelozerr commented on June 15, 2024

You mean time loading for a module? For the moment I have one big JSON Tern def for YUI and the loads is good.

from tern.java.

paulvi avatar paulvi commented on June 15, 2024

I mead developing time.
Is it easy to add more modules?
What time is needed to add one?

from tern.java.

angelozerr avatar angelozerr commented on June 15, 2024

Tern provides JSON Type Def which is a JSON which describes your structure (ex : document has getElementById whicg returns an Element). It's very easy to write it. See https://github.com/marijnh/tern/blob/master/defs/browser.json for instance for browser structure.

If your JS Framework is complex like angular, require.js which manages injection, you must write tern plugins. For instance if you wish to manage

var fs = require('fs');

the require must return an instance of fs. It is done in https://github.com/marijnh/tern/blob/master/plugin/node.js#L88 with infer.registerFunction("nodeRequire", function(_self, _args, argNodes)

Once you have understood the ast of acorn and feature of tern like propagation, developping tern plugin is not very difficult. And as tern can be executed in browser, I develop tern plugin with Chrome.

from tern.java.

paulvi avatar paulvi commented on June 15, 2024

Well, this now became as thing worth to be in a new issue. But I am not ready yet.

from tern.java.

angelozerr avatar angelozerr commented on June 15, 2024

For info I have created https://github.com/angelozerr/tern.yuidoc which generates tern def from YUI and AlloyUI sources by using yuidoc.

You can see online demo :

Those 2 tern plugin are integrated too into tern.java to use it with Eclipse IDE.

I close this issue. Those plugins must be improved. Please create issues at https://github.com/angelozerr/tern.yuidoc/issues

from tern.java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.