src/JSUtils/ScopeManager.js
function initTernEnv() {
        var path = [_absoluteModulePath, "node/node_modules/tern/defs/"].join("/"),
            files = builtinFiles,
            library;

        files.forEach(function (i) {
            FileSystem.resolve(path + i, function (err, file) {
                if (!err) {
                    FileUtils.readAsText(file).done(function (text) {
                        library = JSON.parse(text);
                        builtinLibraryNames.push(library["!name"]);
                        ternEnvironment.push(library);
                    }).fail(function (error) {
                        console.log("failed to read tern config file " + i);
                    });
                } else {
                    console.log("failed to read tern config file " + i);
                }
            });
        });
    }
function initTernEnv() {
        var path = [_absoluteModulePath, "node/node_modules/tern/defs/"].join("/"),
            files = builtinFiles,
            library;

        files.forEach(function (i) {
            FileSystem.resolve(path + i, function (err, file) {
                if (!err) {
                    FileUtils.readAsText(file).done(function (text) {
                        library = JSON.parse(text);
                        builtinLibraryNames.push(library["!name"]);
                        ternEnvironment.push(library);
                    }).fail(function (error) {
                        console.log("failed to read tern config file " + i);
                    });
                } else {
                    console.log("failed to read tern config file " + i);
                }
            });
        });
    }
function initTernEnv ( ) { var path = [ _absoluteModulePath , "node/node_modules/tern/defs/" ] . join ( "/" ) , files = builtinFiles , library ; files . forEach ( function ( i ) { FileSystem . resolve ( path + i , function ( err , file ) { if ( ! err ) { FileUtils . readAsText ( file ) . done ( function ( text ) { library = JSON . parse ( text ) ; builtinLibraryNames . push ( library [ "!name" ] ) ; ternEnvironment . push ( library ) ; } ) . fail ( function ( error ) { console . log ( "failed to read tern config file " + i ) ; } ) ; } else { console . log ( "failed to read tern config file " + i ) ; } } ) ; } ) ; }
Read in the json files that have type information for the builtins, dom,etc
Read in the json files that have type information for the builtins dom etc