mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-04 02:51:19 +08:00
DISABLE_THIRD_PARTY_CHECK=Add node_modules R=jacktfranklin@chromium.org,aerotwist@chromium.org Bug: 1084578 Change-Id: I70e03fa74f53960a17c884a2bac4027382d66525 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208135 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
20 lines
446 B
JavaScript
20 lines
446 B
JavaScript
import { minify } from "../lib/minify";
|
|
|
|
export function default_options() {
|
|
const defs = {};
|
|
|
|
Object.keys(infer_options({ 0: 0 })).forEach((component) => {
|
|
const options = infer_options({
|
|
[component]: {0: 0}
|
|
});
|
|
|
|
if (options) defs[component] = options;
|
|
});
|
|
return defs;
|
|
}
|
|
|
|
function infer_options(options) {
|
|
var result = minify("", options);
|
|
return result.error && result.error.defs;
|
|
}
|