Created
April 3, 2012 13:05
-
-
Save pjako/2291845 to your computer and use it in GitHub Desktop.
Dart Docs generation Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import('dart:io'); | |
final String PATH_TO_DARTSDK = "/Users/XYZ/dart-sdk"; | |
final String SUBDIRECTORY = ""; | |
final String LIBRARY_DARTFILE = "XYZ.dart"; | |
main() { | |
var p = new Process.start("${PATH_TO_DARTSDK}bin/dart", ['${PATH_TO_DARTSDK}lib/dartdoc/dartdoc.dart', "--mode=static", "${new Directory.current().path}$SUBDIRECTORY$LIBRARY_DARTFILE"],"${new Directory.current().path}$SUBDIRECTORY"); | |
var stdoutStream = new StringInputStream(p.stdout); | |
stdoutStream.onLine = () => print(stdoutStream.readLine()); | |
p.onExit = (exitCode) { | |
print('exit code: $exitCode'); | |
p.close(); | |
}; | |
p.onError = (errorCode) { | |
print('exit code: $errorCode'); | |
p.close(); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked great for me, though I had to flip all the paths from '/' to '' to run it on windows.