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

Side by Side Diff: pkg/docgen/bin/docgen.dart

Issue 162223002: Add --compile flag. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | pkg/docgen/lib/docgen.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 9
10 import '../lib/docgen.dart'; 10 import '../lib/docgen.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 packageRoot: options['package-root'], 45 packageRoot: options['package-root'],
46 outputToYaml: !options['json'], 46 outputToYaml: !options['json'],
47 includePrivate: options['include-private'], 47 includePrivate: options['include-private'],
48 includeSdk: includeSdk, 48 includeSdk: includeSdk,
49 parseSdk: options['parse-sdk'], 49 parseSdk: options['parse-sdk'],
50 append: options['append'] && new Directory(options['out']).existsSync(), 50 append: options['append'] && new Directory(options['out']).existsSync(),
51 introFileName: introduction, 51 introFileName: introduction,
52 out: options['out'], 52 out: options['out'],
53 excludeLibraries: excludedLibraries, 53 excludeLibraries: excludedLibraries,
54 includeDependentPackages: options['include-dependent-packages'], 54 includeDependentPackages: options['include-dependent-packages'],
55 compile: options['compile'],
55 serve: options['serve'], 56 serve: options['serve'],
56 dartBinary: dartBinary, 57 dartBinary: dartBinary,
57 pubScript: pubScript, 58 pubScript: pubScript,
58 noDocs: options['no-docs'], 59 noDocs: options['no-docs'],
59 startPage: startPage); 60 startPage: startPage);
60 } 61 }
61 62
62 /** 63 /**
63 * Print help if we are passed the help option or invalid arguments. 64 * Print help if we are passed the help option or invalid arguments.
64 */ 65 */
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 defaultsTo: true, 118 defaultsTo: true,
118 negatable: true); 119 negatable: true);
119 parser.addFlag('parse-sdk', 120 parser.addFlag('parse-sdk',
120 help: 'Parses the SDK libraries only.', 121 help: 'Parses the SDK libraries only.',
121 defaultsTo: false, negatable: false); 122 defaultsTo: false, negatable: false);
122 parser.addOption('package-root', 123 parser.addOption('package-root',
123 help: 'Sets the package root of the library being analyzed.'); 124 help: 'Sets the package root of the library being analyzed.');
124 parser.addFlag('append', 125 parser.addFlag('append',
125 help: 'Append to the docs folder, library_list.json and index.txt', 126 help: 'Append to the docs folder, library_list.json and index.txt',
126 defaultsTo: false, negatable: false); 127 defaultsTo: false, negatable: false);
128 parser.addFlag('compile', help: 'Clone the documentation viewer repo locally '
129 '(if not already present) and compile with dart2js', defaultsTo: false,
130 negatable: false);
127 parser.addFlag('serve', help: 'Clone the documentation viewer repo locally ' 131 parser.addFlag('serve', help: 'Clone the documentation viewer repo locally '
128 '(if not already present) and start a simple server', defaultsTo: false, 132 '(if not already present), compile with dart2js, '
129 negatable: false); 133 'and start a simple server',
134 defaultsTo: false, negatable: false);
130 parser.addFlag('no-docs', help: 'Do not generate any new documentation', 135 parser.addFlag('no-docs', help: 'Do not generate any new documentation',
131 defaultsTo: false, negatable: false); 136 defaultsTo: false, negatable: false);
132 parser.addOption('introduction', 137 parser.addOption('introduction',
133 help: 'Adds the provided markdown text file as the introduction' 138 help: 'Adds the provided markdown text file as the introduction'
134 ' for the generated documentation.', defaultsTo: ''); 139 ' for the generated documentation.', defaultsTo: '');
135 parser.addOption('out', 140 parser.addOption('out',
136 help: 'The name of the output directory.', 141 help: 'The name of the output directory.',
137 defaultsTo: 'docs'); 142 defaultsTo: 'docs');
138 parser.addOption('exclude-lib', 143 parser.addOption('exclude-lib',
139 help: 'Exclude the library by this name from the documentation', 144 help: 'Exclude the library by this name from the documentation',
140 allowMultiple: true, 145 allowMultiple: true,
141 callback: (libs) => excludedLibraries.addAll(libs)); 146 callback: (libs) => excludedLibraries.addAll(libs));
142 parser.addFlag('include-dependent-packages', 147 parser.addFlag('include-dependent-packages',
143 help: 'Assumes we are documenting a single package and are running ' 148 help: 'Assumes we are documenting a single package and are running '
144 'in the directory with its pubspec. Includes documentation for all ' 149 'in the directory with its pubspec. Includes documentation for all '
145 'of its dependent packages.', 150 'of its dependent packages.',
146 defaultsTo: true, negatable: true); 151 defaultsTo: true, negatable: true);
147 parser.addOption('sdk', 152 parser.addOption('sdk',
148 help: 'SDK directory', 153 help: 'SDK directory',
149 defaultsTo: null); 154 defaultsTo: null);
150 parser.addOption('start-page', 155 parser.addOption('start-page',
151 help: 'By default the viewer will start at the SDK introduction page.' 156 help: 'By default the viewer will start at the SDK introduction page.'
152 'To start at some other page, e.g. for a package, provide the name ' 157 'To start at some other page, e.g. for a package, provide the name '
153 'of the package in this argument, e.g. --start-page=intl will make ' 158 'of the package in this argument, e.g. --start-page=intl will make '
154 'the start page of the viewer be the intl package.', 159 'the start page of the viewer be the intl package.',
155 defaultsTo: null); 160 defaultsTo: null);
156 161
157 return parser; 162 return parser;
158 } 163 }
OLDNEW
« no previous file with comments | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | pkg/docgen/lib/docgen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698