Skip to content

Instantly share code, notes, and snippets.

@matthewp
Created August 14, 2015 14:33
Show Gist options
  • Save matthewp/1ce67c491fd3e6f18788 to your computer and use it in GitHub Desktop.
Save matthewp/1ce67c491fd3e6f18788 to your computer and use it in GitHub Desktop.
Who imported me?
<script src="node_modules/steal/steal.js"></script>
<script>
var oldNormalize = System.normalize;
System.normalize = function(name, parentName){
return oldNormalize.apply(this, arguments).then(function(name){
if(name === "my/module") {
console.log(name, "is imported by", parentName);
}
return name;
});
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment