Skip to content

Instantly share code, notes, and snippets.

@bajtos
Last active December 18, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bajtos/5782197 to your computer and use it in GitHub Desktop.
Save bajtos/5782197 to your computer and use it in GitHub Desktop.
_doGetResourceTree: function(params, done) {
this._debuggerClient.evaluateGlobal('process.argv[1]', function(err, argv1) {
if (err) return done(err);
this._scriptStorage.findApplicationRoot(argv1, function(root) {
this._scriptStorage.findAllScripts(root, function(err, files) {
if (err) return done(err);
return done(null, this._createResourceTreeResponse(files));
}.bind(this));
}.bind(this));
}.bind(this));
}
_doGetResourceTree: function(params, done) {
async.waterfall(
[
this._debuggerClient.evaluateGlobal.bind(this._debuggerClient, 'process.argv[1]'),
this._scriptStorage.findApplicationRoot.bind(this._scriptStorage),
this._scriptStorage.findAllScripts.bind(this._scriptStorage)
],
function(err, files) {
if (err) return done(err);
return done(null, this._createResourceTreeResponse(files));
}.bind(this)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment