@@ -50,79 +50,6 @@ Iterable<String> _doList(String dir, Set<String> listedDirectories,
50
50
}
51
51
}
52
52
53
- /// Given a package name, explore the directory and pull out all top level
54
- /// library files in the "lib" directory to document.
55
- @deprecated
56
- Iterable <String > findFilesToDocumentInPackage (
57
- String basePackageDir, bool autoIncludeDependencies) sync * {
58
- final String sep = path.separator;
59
-
60
- Set <String > packageDirs = new Set ()..add (basePackageDir);
61
-
62
- if (autoIncludeDependencies) {
63
- Map <String , Uri > info = package_config
64
- .findPackagesFromFile (
65
- new Uri .file (path.join (basePackageDir, 'pubspec.yaml' )))
66
- .asMap ();
67
- for (String packageName in info.keys) {
68
- if (! config.excludePackages.contains (packageName)) {
69
- packageDirs.add (path.dirname (info[packageName].toFilePath ()));
70
- }
71
- }
72
- }
73
-
74
- for (String packageDir in packageDirs) {
75
- var packageLibDir = path.join (packageDir, 'lib' );
76
- var packageLibSrcDir = path.join (packageLibDir, 'src' );
77
- // To avoid analyzing package files twice, only files with paths not
78
- // containing '/packages' will be added. The only exception is if the file
79
- // to analyze already has a '/package' in its path.
80
- for (var lib
81
- in listDir (packageDir, recursive: true , listDir: _packageDirList)) {
82
- if (lib.endsWith ('.dart' ) &&
83
- (! lib.contains ('${sep }packages${sep }' ) ||
84
- packageDir.contains ('${sep }packages${sep }' ))) {
85
- // Only include libraries within the lib dir that are not in lib/src
86
- if (path.isWithin (packageLibDir, lib) &&
87
- ! path.isWithin (packageLibSrcDir, lib)) {
88
- // Only add the file if it does not contain 'part of'
89
- var contents = new File (lib).readAsStringSync ();
90
-
91
- if (contents.contains (newLinePartOfRegexp) ||
92
- contents.startsWith (partOfRegexp)) {
93
- // NOOP: it's a part file
94
- } else {
95
- yield lib;
96
- }
97
- }
98
- }
99
- }
100
- }
101
- }
102
-
103
- /// If [dir] contains both a `lib` directory and a `pubspec.yaml` file treat
104
- /// it like a package and only return the `lib` dir.
105
- ///
106
- /// This ensures that packages don't have non-`lib` content documented.
107
- @deprecated
108
- Iterable <FileSystemEntity > _packageDirList (Directory dir) sync * {
109
- var entities = dir.listSync ();
110
-
111
- var pubspec = entities.firstWhere (
112
- (e) => e is File && path.basename (e.path) == 'pubspec.yaml' ,
113
- orElse: () => null );
114
-
115
- var libDir = entities.firstWhere (
116
- (e) => e is Directory && path.basename (e.path) == 'lib' ,
117
- orElse: () => null );
118
-
119
- if (pubspec != null && libDir != null ) {
120
- yield libDir;
121
- } else {
122
- yield * entities;
123
- }
124
- }
125
-
126
53
/// Converts `.` and `:` into `-` , adding a ".html" extension.
127
54
///
128
55
/// For example:
0 commit comments