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

Unified Diff: pkg/polymer/lib/src/build/runner.dart

Issue 131913005: Minor changes in lib.src.build.runner, and fix version (now that we determined (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/runner.dart
diff --git a/pkg/polymer/lib/src/build/runner.dart b/pkg/polymer/lib/src/build/runner.dart
index 2706f47c5bf990cb4b359c54475bef232afb7e18..af71282fab953b236b61390174a8700483f1a950 100644
--- a/pkg/polymer/lib/src/build/runner.dart
+++ b/pkg/polymer/lib/src/build/runner.dart
@@ -47,9 +47,16 @@ class BarbackOptions {
*/
final bool machineFormat;
+ /**
+ * Whether to follow symlinks when listing directories. By default this is
+ * false because directories have symlinks for the packages directory created
+ * by pub, but it can be turned on for custom uses of this library.
+ */
+ final bool followLinks;
+
BarbackOptions(this.phases, this.outDir, {currentPackage, packageDirs,
this.transformTests: false, this.transformPolymerDependencies: false,
- this.machineFormat: false})
+ this.machineFormat: false, this.followLinks: false})
: currentPackage = (currentPackage != null
? currentPackage : readCurrentPackageFromPubspec()),
packageDirs = (packageDirs != null
@@ -123,7 +130,7 @@ Iterable<String> _listPackageDir(String package, String subDir,
if (packageDir == null) return const [];
var dir = new Directory(path.join(packageDir, subDir));
if (!dir.existsSync()) return const [];
- return dir.listSync(recursive: true, followLinks: false)
+ return dir.listSync(recursive: true, followLinks: options.followLinks)
.where((f) => f is File)
.map((f) => path.relative(f.path, from: packageDir));
}
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698