Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py

Issue 2191473005: DevTools: remove release mode from runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/inspector.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py
diff --git a/third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py b/third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py
index e88dab615d5ff927969f477edd85826ca78bc669..8831e6123e670ac0cf7ca655e2b5eb8965bbf973 100755
--- a/third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py
+++ b/third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py
@@ -42,7 +42,7 @@ def minify_js(javascript):
def concatenated_module_filename(module_name, output_dir):
- return join(output_dir, module_name + '_module.js')
+ return join(output_dir, module_name + '/' + module_name + '_module.js')
def symlink_or_copy_file(src, dest, safe=False):
@@ -100,6 +100,9 @@ class ReleaseBuilder(AppBuilder):
AppBuilder.__init__(self, application_name, descriptors, application_dir, output_dir)
def build_app(self):
+ for module in self.descriptors.application.values():
+ if 'type' in module and module['type'] == 'remoteInRelease':
+ module['type'] = 'remote'
if self.descriptors.has_html:
self._build_html()
self._build_app_script()
@@ -138,20 +141,20 @@ class ReleaseBuilder(AppBuilder):
result = []
for name in module_descriptors:
module = copy.copy(module_descriptors[name])
+ module_type = self.descriptors.application[name].get('type')
# Clear scripts, as they are not used at runtime
# (only the fact of their presence is important).
resources = module.get('resources', None)
if module.get('scripts') or resources:
- module['scripts'] = []
- # Resources list is not used at runtime.
+ if module_type == 'autostart':
+ # Autostart modules are already baked in.
+ del module['scripts']
+ else:
+ # Non-autostart modules are vulcanized.
+ module['scripts'] = [name + '_module.js']
+ # Resources are already baked into scripts.
if resources is not None:
del module['resources']
- condition = self.descriptors.application[name].get('condition')
- if condition:
- module['condition'] = condition
- type = self.descriptors.application[name].get('type')
- if type == 'remote':
- module['remote'] = True
result.append(module)
return json.dumps(result)
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/inspector.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698