From ac228392dab60dadb1ded63d3715056554a11a9d Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Mon, 9 May 2016 14:45:30 -0700 Subject: [PATCH] enable serving files outside the root path Closes #103 --- CHANGELOG.md | 4 ++++ lib/src/generate/options.dart | 5 +++-- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aef2f7923..183f2e31b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.3.0+2 +- Enable serving files outside the server root by default (enables serving + files from other packages). + ## 0.3.0+1 - Fix an AssetGraph bug where generated nodes might be created as non-generated nodes if they are attempted to be read from previous build steps. diff --git a/lib/src/generate/options.dart b/lib/src/generate/options.dart index 92eea0bd3..183d23d6b 100644 --- a/lib/src/generate/options.dart +++ b/lib/src/generate/options.dart @@ -79,8 +79,9 @@ class BuildOptions { address ??= 'localhost'; directory ??= '.'; port ??= 8000; - requestHandler ??= createStaticHandler(directory, - defaultDocument: 'index.html', listDirectories: true); + requestHandler ??= createStaticHandler( + directory, defaultDocument: 'index.html', listDirectories: true, + serveFilesOutsidePath: true); debounceDelay ??= const Duration(milliseconds: 250); packageGraph ??= new PackageGraph.forThisPackage(); var cache = new AssetCache(); diff --git a/pubspec.yaml b/pubspec.yaml index bc5ca1130..9f2653dda 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: build -version: 0.3.0+1 +version: 0.3.0+2 description: A build system for Dart. author: Dart Team homepage: https://github.com/dart-lang/build