Skip to content

Instantly share code, notes, and snippets.

@adam-singer
Forked from pjako/docsGen.dart
Created April 3, 2012 22:50
Show Gist options
  • Save adam-singer/2296082 to your computer and use it in GitHub Desktop.
Save adam-singer/2296082 to your computer and use it in GitHub Desktop.
Dart Docs generation Script
#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