Files
react-native-devtools-frontend/package.json
T
Jack Franklin 81eb91a605 Script to generate dark mode stylesheets
This CL provides a script that generates a dark mode stylesheet for a
given sheet, just like the runtime color patching (in fact, it uses the
same code!).

The script loads up the given CSS file, imports `ThemeSupport`, and
patches it. It then takes the final CSS file and prefixes
`:host-context(.-theme-with-dark-background)` to each selector. We can
then load the lightmode and the dark mode stylesheet into DevTools.

This is non ideal because we end up loading two stylesheets, but the
alternative is to maintain the runtime color patching for ever, or
update all third party stylesheets to use our CSS variables, which is a
lot of work.

The script does rely on the hosted mode server running but I think this
is reasonable; it's only going to be run rarely on a few CSS files, so
we won't be running it automatically on CI or anything so we can keep
the process fairly manual.

Bug: 1152736
Change-Id: I707c53fbccb3e03c9fac6691f40df32bcdb17c1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2587024
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-12-14 10:47:31 +00:00

58 lines
3.5 KiB
JSON

{
"author": "The Chromium Authors",
"bugs": {
"url": "https://bugs.chromium.org/p/chromium/issues/list?can=2&q=component:Platform%3EDevTools%20&sort=-opened&colspec=ID%20Stars%20Owner%20Summary%20Modified%20Opened"
},
"description": "Chrome DevTools UI",
"homepage": "https://devtools.chrome.com",
"keywords": [
"devtools",
"chrome",
"chromium",
"blink",
"debugger"
],
"license": "BSD-3-Clause",
"name": "chrome-devtools-frontend",
"repository": {
"type": "git",
"url": "git+https://github.com/ChromeDevTools/devtools-frontend.git"
},
"scripts": {
"auto-debug-e2etest": "autoninja -C out/Default && npm run debug-e2etest --",
"auto-debug-unittest": "DEBUG=1 npm run auto-unittest --",
"auto-e2etest": "autoninja -C out/Default && npm run e2etest --",
"auto-unittest": "scripts/test/run_auto_unittests.py --no-text-coverage",
"auto-interactionstest": "autoninja -C out/Default && scripts/test/run_test_suite.py --test-suite=interactions",
"check": "npm run check-json && npm run check-gn && npm run check-lint && npm run check-loc",
"check-gn": "third_party/node/node.py --output scripts/check_gn.js",
"check-grdp": "third_party/node/node.py --output scripts/localization/check_localizable_resources.js",
"check-json": "third_party/node/node.py --output scripts/json_validator/validate_module_json.js",
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.js && scripts/test/run_lint_check_css.py",
"check-loc": "scripts/test/run_localization_check.py",
"components-server": "third_party/node/node.py --output scripts/component_server/server.js",
"debug-e2etest": "DEBUG=1 scripts/test/run_test_suite.py --test-suite=e2e",
"debug-test": "third_party/node/node.py --output scripts/npm_test.js --debug-devtools",
"debug-unittest": "DEBUG=1 npm run unittest",
"e2etest": "scripts/test/run_test_suite.py --test-suite=e2e",
"interactionstest": "scripts/test/run_test_suite.py --test-suite=interactions",
"eslint-test": "mocha \"./scripts/eslint_rules/tests/*_test.js\"",
"generate-dark-mode-styles": "scripts/dark_mode/run_dark_theme_generator.py",
"generate-protocol-resources": "scripts/deps/generate_protocol_resources.py && git cl format --js",
"grdp-utils-test": "mocha \"./scripts/localization/utils/tests/*_test.js\"",
"install-deps": "scripts/deps/manage_node_deps.py",
"interactive-screenshottest": "INTERACTIVE=1 scripts/test/run_test_suite.py --test-suite=screenshots",
"optimize-svg-images": "scripts/optimize_svg_images.py",
"perf": "scripts/test/run_test_suite.py --test-suite=perf",
"screenshottest": "scripts/test/run_test_suite.py --test-suite=screenshots",
"server": "third_party/node/node.py --output scripts/hosted_mode/server.js",
"setup-dtrun": "cd scripts/devtools_run && npm link",
"start": "node -e 'console.log(`This script has been removed in favor of --custom-devtools-frontend. For more information, see https://docs.google.com/document/d/1COgCBWWuTh2o-Zbp6h_z0h0LtlJaimaEDsION4RZPxc/edit?usp=sharing`);'",
"test": "third_party/node/node.py --output scripts/npm_test.js",
"test-local": "third_party/node/node.py --output scripts/npm_test.js --layout-tests-directory=test/webtests/",
"ts_library-test": "./third_party/typescript/tests/verify_ts_libary.sh",
"unittest": "scripts/test/run_unittests.py --no-text-coverage",
"watch": "third_party/node/node.py --output scripts/watch_build.js"
}
}