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

Tern Explorer is empty #313

Closed
paulvi opened this issue Sep 4, 2015 · 6 comments
Closed

Tern Explorer is empty #313

paulvi opened this issue Sep 4, 2015 · 6 comments
Milestone

Comments

@paulvi
Copy link
Contributor

paulvi commented Sep 4, 2015

When/how TernExplorer #289 is updated

image

var fs = require("fs");

var folderName = __dirname;  // for current folder
var maxlength = 90;

function getFiles(dir, files_) {
    files_ = files_ || [];
    var files = fs.readdirSync(dir);
    for ( var i in files) {
        var name = dir + '/' + files[i];
        if (fs.statSync(name).isDirectory()) {
            getFiles(name, files_);
        } else {
            files_.push(name);
        }
    }
    return files_;
}

var files = getFiles(folderName);
console.log(files);
for (var i = 0; i < files.length; i++) {
    var filename = files[i];
    if (filename.length > maxlength) {
        console.log("Deleting " + filename);
        fs.unlinkSync(filename);
    }
}
@angelozerr
Copy link
Owner

Have you checked Outline tern modules like explained at https://github.com/angelozerr/tern.java/wiki/Tern-Outline-support

This Tern Explorer is refreshed as soon as you are typing JS code. If it doesn't work, please try with a simple code like "var a;".

@paulvi
Copy link
Contributor Author

paulvi commented Sep 8, 2015

open Project Properties, click on Tern / Modules item and select the Outline tern plugin (ECMAScript tern plugin must be selected too) :

@paulvi
Copy link
Contributor Author

paulvi commented Sep 8, 2015

I went into project properties, checked Outline, but Tern Explorer is still empty.

Here is current .tern-project

{"ide":{},"libs":["ecma5"],"plugins":{"outline":{},"node":{}}}

@angelozerr
Copy link
Owner

@paulvi I think it's a bug, I suggest you to open Tern Console and you will see errors. Please try with a simple code like "var a".

@angelozerr
Copy link
Owner

@paulvi I have fixed teh bug, but there are again a little bug which doesn't display your fs variable.

@angelozerr angelozerr added this to the 1.1.0 milestone Sep 10, 2015
@angelozerr
Copy link
Owner

@paulvi I have fixed the problem, please test in your side. Here the result:

fixternexplorerempty

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