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

Side by Side Diff: client/tools/update.py

Issue 8570020: Fixed update to correctly call htmlconverter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | 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 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 # This script builds and then uploads the Dart client sample app to AppEngine, 6 # This script builds and then uploads the Dart client sample app to AppEngine,
7 # where it is accessible by visiting http://dart.googleplex.com. 7 # where it is accessible by visiting http://dart.googleplex.com.
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 20 matching lines...) Expand all
31 os.putenv('DART_JVMARGS', '-Xmx512m') 31 os.putenv('DART_JVMARGS', '-Xmx512m')
32 32
33 if 'dart' in options.target: 33 if 'dart' in options.target:
34 htmlconverter.convertForDartium( 34 htmlconverter.convertForDartium(
35 infile, 35 infile,
36 outDirBase, 36 outDirBase,
37 outfile.replace('.html', '-dart.html'), 37 outfile.replace('.html', '-dart.html'),
38 options.verbose) 38 options.verbose)
39 if 'js' in options.target: 39 if 'js' in options.target:
40 htmlconverter.convertForChromium( 40 htmlconverter.convertForChromium(
41 infile, options.optimize, options.dartc_extra_flags, 41 infile, options.optimize, options.frog, options.dartc_extra_flags,
42 outfile.replace('.html', '-js.html'), 42 outfile.replace('.html', '-js.html'),
43 options.verbose) 43 options.verbose)
44 44
45 45
46 def Flags(): 46 def Flags():
47 """ Consturcts a parser for extracting flags from the command line. """ 47 """ Consturcts a parser for extracting flags from the command line. """
48 result = optparse.OptionParser() 48 result = optparse.OptionParser()
49 result.add_option("-t", "--target", 49 result.add_option("-t", "--target",
50 help="The target html to generate", 50 help="The target html to generate",
51 metavar="[js,dart]", 51 metavar="[js,dart]",
52 default='js,dart') 52 default='js,dart')
53 result.add_option("--frog",
54 help="Use frog compiler (default dartc)",
55 default=False,
56 action="store_true")
53 result.add_option("--optimize", 57 result.add_option("--optimize",
54 help="Use optimizer in dartc", 58 help="Use optimizer in dartc",
55 default=False, 59 default=False,
56 action="store_true") 60 action="store_true")
57 result.add_option("--verbose", 61 result.add_option("--verbose",
58 help="Print verbose output", 62 help="Print verbose output",
59 default=False, 63 default=False,
60 action="store_true") 64 action="store_true")
61 result.add_option("--dartc_extra_flags", 65 result.add_option("--dartc_extra_flags",
62 help="Additional flag text to pass to dartc", 66 help="Additional flag text to pass to dartc",
(...skipping 20 matching lines...) Expand all
83 # parser.print_help() 87 # parser.print_help()
84 # return 1 88 # return 1
85 89
86 REL_APP_PATH = relpath(APP_PATH) 90 REL_APP_PATH = relpath(APP_PATH)
87 for file in getAllHtmlFiles(): 91 for file in getAllHtmlFiles():
88 infile = join(REL_APP_PATH, file) 92 infile = join(REL_APP_PATH, file)
89 convertOne(infile, options) 93 convertOne(infile, options)
90 94
91 if __name__ == '__main__': 95 if __name__ == '__main__':
92 main() 96 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698