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

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

Issue 242363004: pkg/docgen: moved model classes into minilibs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl nits Created 6 years, 8 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library docgen.package_helpers; 5 library docgen.package_helpers;
6 6
7 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/source_mir rors.dart'; 7 import 'exports/source_mirrors.dart';
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 import 'package:yaml/yaml.dart'; 11 import 'package:yaml/yaml.dart';
12 12
13 /// Helper accessor to determine the full pathname of the root of the dart 13 /// Helper accessor to determine the full pathname of the root of the dart
14 /// checkout. We can be in one of three situations: 14 /// checkout. We can be in one of three situations:
15 /// 1) Running from pkg/docgen/bin/docgen.dart 15 /// 1) Running from pkg/docgen/bin/docgen.dart
16 /// 2) Running from a snapshot in a build, 16 /// 2) Running from a snapshot in a build,
17 /// e.g. xcodebuild/ReleaseIA32/dart-sdk/bin 17 /// e.g. xcodebuild/ReleaseIA32/dart-sdk/bin
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 while (!_pubspecFor(dir).existsSync()) { 75 while (!_pubspecFor(dir).existsSync()) {
76 var newDir = path.dirname(dir); 76 var newDir = path.dirname(dir);
77 if (newDir == dir) return null; 77 if (newDir == dir) return null;
78 dir = newDir; 78 dir = newDir;
79 } 79 }
80 return dir; 80 return dir;
81 } 81 }
82 82
83 File _pubspecFor(String directoryName) => 83 File _pubspecFor(String directoryName) =>
84 new File(path.join(directoryName, 'pubspec.yaml')); 84 new File(path.join(directoryName, 'pubspec.yaml'));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698