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

Side by Side Diff: Source/devtools/scripts/concatenate_application_code.py

Issue 662393007: DevTools: Make compile_frontend.py check code from all applications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comment Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/scripts/compile_frontend.py ('k') | Source/devtools/scripts/modular_build.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Release: 8 Release:
9 - Concatenates autostart modules, application modules' module.json descriptors , 9 - Concatenates autostart modules, application modules' module.json descriptors ,
10 and the application loader into a single script. 10 and the application loader into a single script.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 def _concatenate_application_script(self, output): 188 def _concatenate_application_script(self, output):
189 runtime_contents = read_file(join(self.application_dir, 'Runtime.js')) 189 runtime_contents = read_file(join(self.application_dir, 'Runtime.js'))
190 runtime_contents = re.sub('var allDescriptors = \[\];', 'var allDescript ors = %s;' % self._release_module_descriptors().replace('\\', '\\\\'), runtime_c ontents, 1) 190 runtime_contents = re.sub('var allDescriptors = \[\];', 'var allDescript ors = %s;' % self._release_module_descriptors().replace('\\', '\\\\'), runtime_c ontents, 1)
191 output.write('/* Runtime.js */\n') 191 output.write('/* Runtime.js */\n')
192 output.write(runtime_contents) 192 output.write(runtime_contents)
193 output.write('\n/* Autostart modules */\n') 193 output.write('\n/* Autostart modules */\n')
194 self._concatenate_autostart_modules(output) 194 self._concatenate_autostart_modules(output)
195 output.write('/* Application descriptor %s */\n' % self.app_file('json') ) 195 output.write('/* Application descriptor %s */\n' % self.app_file('json') )
196 output.write('applicationDescriptor = ') 196 output.write('applicationDescriptor = ')
197 output.write(self.descriptors.application_json) 197 output.write(self.descriptors.application_json())
198 output.write(';\n/* Core CSS */\n') 198 output.write(';\n/* Core CSS */\n')
199 self._write_module_css_styles(self.core_css_names(), output) 199 self._write_module_css_styles(self.core_css_names(), output)
200 output.write('\n/* Application loader */\n') 200 output.write('\n/* Application loader */\n')
201 output.write(read_file(join(self.application_dir, self.app_file('js')))) 201 output.write(read_file(join(self.application_dir, self.app_file('js'))))
202 202
203 def _concatenate_dynamic_module(self, module_name): 203 def _concatenate_dynamic_module(self, module_name):
204 module = self.descriptors.modules[module_name] 204 module = self.descriptors.modules[module_name]
205 scripts = module.get('scripts') 205 scripts = module.get('scripts')
206 stylesheets = self.descriptors.module_stylesheets(module_name) 206 stylesheets = self.descriptors.module_stylesheets(module_name)
207 if not scripts and not stylesheets: 207 if not scripts and not stylesheets:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 hardlink_or_copy_file(join(self.application_dir, html_name), join(self.o utput_dir, html_name), True) 261 hardlink_or_copy_file(join(self.application_dir, html_name), join(self.o utput_dir, html_name), True)
262 262
263 263
264 def build_application(application_name, loader, application_dir, output_dir, rel ease_mode): 264 def build_application(application_name, loader, application_dir, output_dir, rel ease_mode):
265 descriptors = loader.load_application(application_name + '.json') 265 descriptors = loader.load_application(application_name + '.json')
266 if release_mode: 266 if release_mode:
267 builder = ReleaseBuilder(application_name, descriptors, application_dir, output_dir) 267 builder = ReleaseBuilder(application_name, descriptors, application_dir, output_dir)
268 else: 268 else:
269 builder = DebugBuilder(application_name, descriptors, application_dir, o utput_dir) 269 builder = DebugBuilder(application_name, descriptors, application_dir, o utput_dir)
270 builder.build_app() 270 builder.build_app()
OLDNEW
« no previous file with comments | « Source/devtools/scripts/compile_frontend.py ('k') | Source/devtools/scripts/modular_build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698