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

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

Issue 202763006: DevTools: Rename inspector.js -> Main.js to follow the type name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (C) 2010 Google Inc. All rights reserved. 3 # Copyright (C) 2010 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 45
46 def write_devtools_html(inspector_file, devtools_file, debug): 46 def write_devtools_html(inspector_file, devtools_file, debug):
47 for line in inspector_file: 47 for line in inspector_file:
48 if not debug and '<script ' in line: 48 if not debug and '<script ' in line:
49 continue 49 continue
50 if not debug and '<link ' in line: 50 if not debug and '<link ' in line:
51 continue 51 continue
52 if '</head>' in line and not debug: 52 if '</head>' in line and not debug:
53 devtools_file.write(generate_include_tag("inspector.css")) 53 devtools_file.write(generate_include_tag("inspector.css"))
54 devtools_file.write(generate_include_tag("inspector.js")) 54 devtools_file.write(generate_include_tag("Main.js"))
55 devtools_file.write(line) 55 devtools_file.write(line)
56 if '<head>' in line: 56 if '<head>' in line:
57 devtools_file.write(generate_include_tag("buildSystemOnly.js")) 57 devtools_file.write(generate_include_tag("buildSystemOnly.js"))
58 58
59 59
60 def main(argv): 60 def main(argv):
61 61
62 if len(argv) < 4: 62 if len(argv) < 4:
63 print('usage: %s inspector_html devtools_html debug' % argv[0]) 63 print('usage: %s inspector_html devtools_html debug' % argv[0])
64 return 1 64 return 1
(...skipping 13 matching lines...) Expand all
78 inspector_html.close() 78 inspector_html.close()
79 79
80 # Touch output file directory to make sure that Xcode will copy 80 # Touch output file directory to make sure that Xcode will copy
81 # modified resource files. 81 # modified resource files.
82 if sys.platform == 'darwin': 82 if sys.platform == 'darwin':
83 output_dir_name = os.path.dirname(devtools_html_name) 83 output_dir_name = os.path.dirname(devtools_html_name)
84 os.utime(output_dir_name, None) 84 os.utime(output_dir_name, None)
85 85
86 if __name__ == '__main__': 86 if __name__ == '__main__':
87 sys.exit(main(sys.argv)) 87 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « Source/devtools/scripts/frontend_modules.json ('k') | Tools/Scripts/webkitpy/style/checker_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698