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

Side by Side Diff: dart/runtime/bin/vmservice/client/build.dart

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « dart/runtime/bin/net/zlib.gyp ('k') | dart/runtime/bin/vmservice/client/build_.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:polymer/builder.dart';
6 import 'dart:io';
7 import 'dart:async';
8
9 main() {
10 lint()
11 .then((_) => deploy()).then(compileToJs);
12 }
13
14 String findDart2JS() {
15 var dartPath = Platform.executable;
16 var lastIndex = dartPath.lastIndexOf(Platform.pathSeparator);
17 if (lastIndex != -1) {
18 var binPath = dartPath.substring(0, lastIndex);
19 return '$binPath${Platform.pathSeparator}dart2js';
20 }
21 return 'dart2js';
22 }
23
24 void runDart2JS(String input, String output) {
25 var dart2js_path = findDart2JS();
26 var result =
27 Process.runSync(dart2js_path,
28 [ '--minify', '-o', output, input], runInShell: true);
29 print(result.stdout);
30 print(result.stderr);
31 if (result.exitCode != 0) {
32 print("Running dart2js failed.");
33 exit(result.exitCode);
34 }
35 }
36
37 compileToJs(_) {
38 print("Running dart2js");
39 runDart2JS('out/web/index.html_bootstrap.dart',
40 'out/web/index.html_bootstrap.dart.js');
41 runDart2JS('out/web/index_devtools.html_bootstrap.dart',
42 'out/web/index_devtools.html_bootstrap.dart.js');
43 print("Done");
44 }
OLDNEW
« no previous file with comments | « dart/runtime/bin/net/zlib.gyp ('k') | dart/runtime/bin/vmservice/client/build_.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698