MCPcopy Create free account
hub / github.com/TypeStrong/tsify / rebundle

Function rebundle

test/test.js:700–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

698 rebundle();
699
700 function rebundle() {
701 var calledBack = false;
702 var errors = [];
703
704 b.bundle()
705 .on('error', function (error) {
706 errors.push(error);
707 })
708 .pipe(es.wait(function (err, actual) {
709 if (calledBack)
710 throw new Error('Bundling completed after build timeout expired');
711 calledBack = true;
712 callNextCallback(errors, actual.toString());
713 }));
714
715 setTimeout(function () {
716 if (calledBack)
717 return;
718 calledBack = true;
719 callNextCallback(errors, null);
720 }, buildTimeout);
721 }
722
723 function callNextCallback(errors, actual) {
724 // hack to wait for Watchify to finish adding any outstanding watchers

Callers 1

runWatchifyFunction · 0.85

Calls 1

callNextCallbackFunction · 0.85

Tested by

no test coverage detected