Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Emberjs #9

Closed
mtangoo opened this issue Jan 2, 2016 · 10 comments
Closed

Support Emberjs #9

mtangoo opened this issue Jan 2, 2016 · 10 comments

Comments

@mtangoo
Copy link

mtangoo commented Jan 2, 2016

If I edit files written in Emberjs tern cannot recognize them and throws error 12:09:40: Error: Failed to Parse Outlines. I have two requests in this:

  1. Can you consider to support Emberjs?
  2. Can you add a way to suppress error (like optional json property)?

Thanks for the good work!

@angelozerr
Copy link
Owner

@mtangoo please add a simple sample (with your github) whch throws this error (i don't know ember and no time to initialize a project). thanks!

  1. Can you consider to support Emberjs?

Please add a sample which causes your problem.

  1. Can you add a way to suppress error (like optional json property)?

Sorry I don't understand?

@mtangoo
Copy link
Author

mtangoo commented Jan 2, 2016

Please add a sample which causes your problem.

Here is a sample model in Ember

import DS from 'ember-data';

export default DS.Model.extend({ 
    name: DS.attr(),
    contact: DS.attr(),
    policy: DS.attr(),
    create_time: DS.attr(),
    update_time: DS.attr()
});

Another one for component

import Ember from 'ember';

export default Ember.Component.extend({
});

Sorry I don't understand?

I mean when error happens it will be logged to standard IO. I want to surpress the error

@angelozerr
Copy link
Owner

Have you tested with the last version of outline.js (not from npm but with github project)?

I have none error with your sample? Please share a github project which have a problem.

Please note that If you wish support ember.js, you should create a tern plugin for that to support DS.model.extend for instance.

@mtangoo
Copy link
Author

mtangoo commented Jan 2, 2016

@angelozerr
I use npm package as it is easy to update. I will test the latest git.

I would like to create a plugin but my NodeJs skills lacks a lot.
I have found it hard to do as there are no abc for starters like me ;)

@angelozerr
Copy link
Owner

@mtangoo please share your project, it will be very easy for me to see the errors.

I would like to create a plugin but my NodeJs skills lacks a lot.

I was not (and I'm not) a big star with javascript, but I have read and debug ternjs a lot. Perhaps you could start with https://github.com/angelozerr/tern-jug

In my case I use chrome to debug my plugin

@mtangoo
Copy link
Author

mtangoo commented Jan 3, 2016

Hi @angelozerr
I scan per file not per project and I have already shared the files contents :)
I will have to test latest github code and see if it have errors.

I will check the plugin, hope its plain javascript. Thanks!

@mtangoo
Copy link
Author

mtangoo commented Jan 5, 2016

Turned on verbose (tern) and it started working fine. I will reopen if it occurs but for now it looks ok (with latest github sources)

@mtangoo mtangoo closed this as completed Jan 5, 2016
@mtangoo mtangoo reopened this Jan 5, 2016
@mtangoo
Copy link
Author

mtangoo commented Jan 5, 2016

So I found the real problem.
I have the following .tern-project in each project (let say under /home/stef/projects/p1/.config/)

{
 "ecmaVersion": 6,
 "libs": [
   "browser",
   "jquery"
 ], 
 "plugins": {
   "lint": {},
   "browser-extension": {},
   "jquery-extension": {},
   "outline": {} 
 }}

and then I have tern server under completely different directory (let say /home/stef/utilities/tern/)

So I invoke tern using full path and set current working dir to the one in project. I find that I get error:

Response: 400 No query type 'outline' defined

But If I run with CWD pointing to tern server it just works fine. Do you know how to fix such situation (I know it might be entirely tern issue, but only if you know how to solve it)

@angelozerr
Copy link
Owner

Perhaps it's the same problem than angelozerr/tern-lint#64 ?

@mtangoo
Copy link
Author

mtangoo commented Jan 5, 2016

let me check that one!

@mtangoo mtangoo closed this as completed Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants