Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Fedia
Created November 16, 2012 17:47
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Fedia/4089364 to your computer and use it in GitHub Desktop.
Save Fedia/4089364 to your computer and use it in GitHub Desktop.
Extending Deployd Event's domain
(function(Script) {
var _run = Script.prototype.run;
Script.prototype.run = function(ctx, domain, fn) {
if (typeof domain === 'object') {
domain.require = function(module) {
return require(module);
};
domain.context = function() { // access Context via context()
return ctx;
};
}
_run.call(this, ctx, domain, fn);
}
})(require('deployd/lib/script'));
@chadobado
Copy link

Fedia any chance you can check my questions here:

https://gist.github.com/LordotU/4555637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment