Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugin-webpack): capture logs into web ui, handle preload scripts
- Loading branch information
1 parent
8ffab0b
commit e800049
Showing
14 changed files
with
617 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ | |
"engines": { | ||
"node": ">= 6.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default <A, B>(fn1: A, fn2: B): [A, B] => { | ||
let once = true; | ||
let val: any; | ||
const make = <T>(fn: T): T => { | ||
return ((...args: any[]) => { | ||
if (once) { | ||
val = (fn as any)(...args); | ||
once = false; | ||
} | ||
return val; | ||
}) as any as T; | ||
}; | ||
return [ | ||
make(fn1), | ||
make(fn2), | ||
]; | ||
}; |
Oops, something went wrong.