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

Unified Diff: dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 11740025: Add dart2js option to select library categories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix dartdoc and some unit tests Created 7 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
diff --git a/dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index b8128a3c8bc03ec95714acc0314dd06b94d8dd8f..7bb466d3ef0ca51954b4d0b448fe4aad0ad95046 100644
--- a/dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -132,7 +132,8 @@ Future<bool> compileScript(int mode, Path outputDir, Path libPath) {
var jsPath = outputDir.append('client-$clientScript.js');
var completer = new Completer<bool>();
- var compilation = new Compilation(dartPath, libPath);
+ var compilation = new Compilation(
+ dartPath, libPath, null, const <String>['--categories=Client,Server']);
Future<String> result = compilation.compileToJavaScript();
result.then((jsCode) {
writeString(new File.fromPath(jsPath), jsCode);
@@ -240,6 +241,9 @@ class Dartdoc {
int get totalTypes => _totalTypes;
int get totalMembers => _totalMembers;
+ static const List<String> COMPILER_OPTIONS =
+ const <String>['--preserve-comments', '--categories=Client,Server'];
+
Dartdoc() {
// Patch in support for [:...:]-style code to the markdown parser.
// TODO(rnystrom): Markdown already has syntax for this. Phase this out?
@@ -317,13 +321,13 @@ class Dartdoc {
void documentEntryPoint(Path entrypoint, Path libPath, Path pkgPath) {
final compilation = new Compilation(entrypoint, libPath, pkgPath,
- <String>['--preserve-comments']);
+ COMPILER_OPTIONS);
_document(compilation);
}
void documentLibraries(List<Path> libraryList, Path libPath, Path pkgPath) {
final compilation = new Compilation.library(libraryList, libPath, pkgPath,
- <String>['--preserve-comments']);
+ COMPILER_OPTIONS);
_document(compilation);
}
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | dart/tests/compiler/dart2js/analyze_api_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698