Skip to content

Instantly share code, notes, and snippets.

@domenic domenic/pipeline.js forked from jorendorff/pipeline.js
Last active Dec 28, 2015

Embed
What would you like to do?
load.metadata = {};
// Call the locate hook.
return loader.locate(name, {
name: load.name,
metadata: load.metadata
}).then(address => {
if (load.linkSets.size === 0)
return;
// This load still matters. Call the fetch hook.
load.address = address;
return loader.fetch({
name: load.name,
metadata: load.metadata,
address: address
});
}).then(source => {
if (load.linkSets.size === 0)
return;
// This load still matters. Call the translate hook.
return loader.translate({
name: load.name,
metadata: load.metadata,
address: load.address,
source: source
});
}).then(source => {
if (load.linkSets.size === 0)
return;
// This load still matters. Call the instantiate hook.
if (callFunction(std_Set_get_size, load.linkSets) === 0)
return;
load.source = source;
return loader.instantiate({
name: load.name,
metadata: load.metadata,
address: load.address,
source: source
});
}).then(InstantiateSucceeded).catch(LoadFailed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.