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

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

Issue 155553002: Run pub update on the pulled down version of dartdoc viewer to run. (Closed) Base URL: https://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 | no next file » | no next file with comments »
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 /// **docgen** is a tool for creating machine readable representations of Dart 5 /// **docgen** is a tool for creating machine readable representations of Dart
6 /// code metadata, including: classes, members, comments and annotations. 6 /// code metadata, including: classes, members, comments and annotations.
7 /// 7 ///
8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files.
9 /// 9 ///
10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR]
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 print('Error cloning git repository:'); 654 print('Error cloning git repository:');
655 print('process output: ${processResult.stdout}'); 655 print('process output: ${processResult.stdout}');
656 print('process stderr: ${processResult.stderr}'); 656 print('process stderr: ${processResult.stderr}');
657 } 657 }
658 } 658 }
659 } 659 }
660 660
661 /// Move the generated json/yaml docs directory to the dartdoc-viewer 661 /// Move the generated json/yaml docs directory to the dartdoc-viewer
662 /// directory, to run as a webpage. 662 /// directory, to run as a webpage.
663 static void _moveDirectoryAndServe() { 663 static void _moveDirectoryAndServe() {
664 var processResult = Process.runSync('pub', ['update'], runInShell: true,
665 workingDirectory: path.join(_dartdocViewerDir.path, 'client'));
666 print('process output: ${processResult.stdout}');
667 print('process stderr: ${processResult.stderr}');
668
664 var dir = new Directory(_Generator._outputDirectory == null? 'docs' : 669 var dir = new Directory(_Generator._outputDirectory == null? 'docs' :
665 _Generator._outputDirectory); 670 _Generator._outputDirectory);
666 var webDocsDir = new Directory(path.join(_dartdocViewerDir.path, 'client', 671 var webDocsDir = new Directory(path.join(_dartdocViewerDir.path, 'client',
667 'web', 'docs')); 672 'web', 'docs'));
668 if (dir.existsSync()) { 673 if (dir.existsSync()) {
669 // Move the docs folder to dartdoc-viewer/client/web/docs 674 // Move the docs folder to dartdoc-viewer/client/web/docs
670 dir.renameSync(webDocsDir.path); 675 dir.renameSync(webDocsDir.path);
671 } 676 }
672 677
673 if (webDocsDir.existsSync()) { 678 if (webDocsDir.existsSync()) {
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 .map((e) => originalMirror.getField(e.simpleName).reflectee) 2139 .map((e) => originalMirror.getField(e.simpleName).reflectee)
2135 .where((e) => e != null) 2140 .where((e) => e != null)
2136 .toList(); 2141 .toList();
2137 } 2142 }
2138 2143
2139 Map toMap() => { 2144 Map toMap() => {
2140 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName, 2145 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName,
2141 'parameters': parameters 2146 'parameters': parameters
2142 }; 2147 };
2143 } 2148 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698