angelozerr / tern.jsduck

Tern Plugin for ExtJS, CKEditor
MIT License
9 stars 3 forks source link

How to install? #1

Open emielvangoor opened 8 years ago

emielvangoor commented 8 years ago

Hi,

How do I install tern.jsduck, I'm new to ternjs and I don't know where to start. I created a .tern-project file in my root directory. What do I need to do now? I installed JSDuck and I'm using ExtJS 6...

Thanks in advance..

angelozerr commented 8 years ago

tern-jsduck is used to generate tern plugin for CKEditor, ExtJS. If you wish do that:

{
  "ecmaVersion": 6,
  "libs": ["browser"],
  "plugins": {
    "ckeditor_4.4.7": {}
  }
}
emielvangoor commented 8 years ago

@angelozerr Thanks for your reply! I downloaded the extjs_5.0.0.js and placed it in the tern/plugin folder and created the .tern-project as you suggested

Now tern throws the following error:

/usr/local/lib/node_modules/tern/lib/def.js:243
    if (/^fn\(/.test(spec)) for (var i = 0; i < type.args.length; ++i) (function
                                                         ^
TypeError: Cannot read property 'length' of undefined
    at parseType (/usr/local/lib/node_modules/tern/lib/def.js:243:58)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:408:9)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at passTwo (/usr/local/lib/node_modules/tern/lib/def.js:426:11)
    at doLoadEnvironment (/usr/local/lib/node_modules/tern/lib/def.js:468:5)
    at Object.exports.load (/usr/local/lib/node_modules/tern/lib/def.js:480:7)
angelozerr commented 8 years ago

Which version of ternjs are you using? With tern 0.17.0 and Eclipse IDE (tern.java), it works great.

I suggets you that you share your project.

fflorent commented 8 years ago

@emielvangoor That's a TernJS issue I also encountered with version 0.18.0. See this issue https://github.com/ternjs/tern/issues/733 (PR #734 has been proposed).

Florent

angelozerr commented 8 years ago

@emielvangoor please retry it, I have fixed the problem by waiting the fix of ternjs.