Chromium Code Reviews| Index: pkg/polymer/lib/src/build/script_compactor.dart |
| diff --git a/pkg/polymer/lib/src/build/script_compactor.dart b/pkg/polymer/lib/src/build/script_compactor.dart |
| index b633360cb27610da7432724910bb1394b32d6a52..9d2dd928cd8e6b0f9b722b7ee2c714f93fe7219e 100644 |
| --- a/pkg/polymer/lib/src/build/script_compactor.dart |
| +++ b/pkg/polymer/lib/src/build/script_compactor.dart |
| @@ -45,7 +45,38 @@ class ScriptCompactor extends Transformer { |
| final TransformOptions options; |
| ScriptCompactor(this.options, {String sdkDir}) |
| - : resolvers = new Resolvers(sdkDir != null ? sdkDir : dartSdkDirectory); |
| + // TODO(sigmund): consider restoring here a resolver that uses the real |
| + // SDK once the analyzer is lazy and only an resolves what it needs: |
| + //: resolvers = new Resolvers.fromSdkDirectory( |
| + // sdkDir != null ? sdkDir : dartSdkDirectory); |
| + : resolvers = new Resolvers.fromMock({ |
| + 'dart:core': ''' |
|
Jennifer Messerly
2014/06/04 04:17:39
just curious, how was this list chosen?
Siggi Cherem (dart-lang)
2014/06/04 21:25:19
The list of libraries was a bit adhoc, I was addin
|
| + library dart.core; |
| + class Object {} |
| + |
| + class String extends Object {} |
| + class num extends Object {} |
| + class int extends num {} |
| + class double extends num {} |
| + class List<V> extends Object {} |
| + class Map<K, V> extends Object {} |
| + class Set<V> extends Object {} |
| + ''', |
| + 'dart:async': 'library dart.async;', |
| + 'dart:html': ''' |
| + library dart.html; |
| + class HtmlElement {} |
| + ''', |
| + 'dart:math': 'library dart.math;', |
| + 'dart:collection': 'library dart.collection;', |
| + 'dart:js': 'library dart.js;', |
| + 'dart:svg': 'library dart.svg;', |
| + 'dart:convert': 'library dart.convert;', |
| + 'dart:mirrors': 'library dart.mirrors;', |
| + 'dart:isolate': 'library dart.isolate;', |
| + }); |
| + |
| + |
| /// Only run on entry point .html files. |
| // TODO(nweiz): This should just take an AssetId when barback <0.13.0 support |