[go: nahoru, domu]

Extract protocol generation to separate script

This allows us to add an npm command that does the same thing. This is
necessary to support the workflow of making changes in the pdl during
development.

You can regenerate the relevant protocol files with
`npm run generate-protocol-resources`. Note that the files it generates
are not formatted, but on presubmit it will both format and lint the
files to the correct notation. However, that should not impact the
workflow of making changes to the protocol files and testing their
behavior.

R=sigurds@chromium.org

Change-Id: I87c06183c8842d8643c4647cb1519850d75bd46d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088093
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
diff --git a/package.json b/package.json
index 96f03ba..9a56640 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
     "debug-unittest": "DEBUG=1 npm run unittest",
     "e2etest": "python scripts/test/run_test_suite.py --test-suite=e2e",
     "generate-jsconfig": "node scripts/generate_jsconfig.js",
+    "generate-protocol-resources": "python scripts/deps/generate_protocol_resources.py",
     "install-deps": "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true python scripts/deps/manage_node_deps.py",
     "interactive-screenshottest": "INTERACTIVE=1 python scripts/test/run_test_suite.py --test-suite=screenshots",
     "optimize-svg-images": "python scripts/optimize_svg_images.py",