mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-15 17:45:53 -07:00
chore: add yarn command to put compiled stylesheets into builds folder
This commit is contained in:
parent
7ae453a61c
commit
6e46b46074
6788 changed files with 697992 additions and 12 deletions
17
node_modules/yargs/build/lib/utils/maybe-async-result.js
generated
vendored
Normal file
17
node_modules/yargs/build/lib/utils/maybe-async-result.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { isPromise } from './is-promise.js';
|
||||
export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => {
|
||||
throw err;
|
||||
}) {
|
||||
try {
|
||||
const result = isFunction(getResult) ? getResult() : getResult;
|
||||
return isPromise(result)
|
||||
? result.then((result) => resultHandler(result))
|
||||
: resultHandler(result);
|
||||
}
|
||||
catch (err) {
|
||||
return errorHandler(err);
|
||||
}
|
||||
}
|
||||
function isFunction(arg) {
|
||||
return typeof arg === 'function';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue