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

Unified Diff: dart/utils/dartdoc/build_helper.dart

Issue 9454026: Skeleton dartdoc launcher. (Closed) Base URL: ssh://aaricia.aar/home/ahe/Dart/all/dart.googlecode.com.git@master
Patch Set: Created 8 years, 10 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 | « dart/dart.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/utils/dartdoc/build_helper.dart
diff --git a/dart/utils/dartdoc/build_helper.dart b/dart/utils/dartdoc/build_helper.dart
new file mode 100644
index 0000000000000000000000000000000000000000..dc0df608f2172e800215e2aba8e723711a7afecf
--- /dev/null
+++ b/dart/utils/dartdoc/build_helper.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#import('dart:io');
+
+main() {
+ List<String> arguments = new Options().arguments;
+ print(arguments);
+ String dartVmLocation = '${arguments[0]}/dart';
+ String dartdocLocation = '${arguments[0]}/dart';
+ String dartdocScript = """
+#!$dartVmLocation
+
+main() {
+ print(\"Hello, World! I'm $dartdocLocation\");
+}
+""";
+ var f = new File(dartdocLocation);
+ var stream = f.openOutputStreamSync();
+ // TODO(ahe): Encode char codes as UTF-8.
+ stream.write(dartdocScript.charCodes());
+ stream.close();
+ // TODO(ahe): Make script executable.
+ // TODO(ahe): Also make a .bat file for Windows.
+}
« no previous file with comments | « dart/dart.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698