fix(transformer): fix 'pub build' in examples
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart.ng_deps.dart;
|
||||
library examples.src.hello_world.absolute_url_expression_files.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
@@ -16,6 +16,7 @@ void initReflector(reflector) {
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'package:other_package/template.html',
|
||||
styles: const [r'''.greeting { .color: blue; }''',])
|
||||
]
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart;
|
||||
library examples.src.hello_world.absolute_url_expression_files;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
@@ -124,8 +124,8 @@ void _testNgDeps(String name, String inputPath,
|
||||
if (output == null) {
|
||||
expect(await reader.hasInput(expectedId)).toBeFalse();
|
||||
} else {
|
||||
expect(formatter.format(output)).toEqual(
|
||||
(await reader.readAsString(expectedId)).replaceAll('\r\n', '\n'));
|
||||
var input = await reader.readAsString(expectedId);
|
||||
expect(formatter.format(output)).toEqual(formatter.format(input));
|
||||
}
|
||||
|
||||
if (expectedLogs != null) {
|
||||
|
||||
@@ -16,6 +16,7 @@ void initReflector(reflector) {
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
library test.transform.directive_processor.url_expression_files.hello.ng_deps.dart;
|
||||
library test.transform.directive_processor.invalid_url_files.hello.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
@@ -14,7 +14,10 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(template: r'''''', styles: const [r'''''', r'''''',])
|
||||
const View(
|
||||
template: r'''''',
|
||||
templateUrl: r'/bad/absolute/url.html',
|
||||
styles: const [r'''''', r'''''',])
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library test.transform.directive_processor.url_expression_files.hello;
|
||||
library test.transform.directive_processor.invalid_url_files.hello;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart.ng_deps.dart;
|
||||
library examples.src.hello_world.multiple_style_urls_files.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
@@ -16,6 +16,7 @@ void initReflector(reflector) {
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart;
|
||||
library examples.src.hello_world.multiple_style_urls_files;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart.ng_deps.dart;
|
||||
library examples.src.hello_world.multiple_style_urls_not_inlined_files.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart;
|
||||
library examples.src.hello_world.multiple_style_urls_not_inlined_files;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart.ng_deps.dart;
|
||||
library examples.src.hello_world.split_url_expression_files.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
@@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(template: r'''{{greeting}}''')
|
||||
const View(template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart;
|
||||
library examples.src.hello_world.split_url_expression_files;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart.ng_deps.dart;
|
||||
library examples.src.hello_world.url_expression_files.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
@@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(template: r'''{{greeting}}''')
|
||||
const View(template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library examples.src.hello_world.index_common_dart;
|
||||
library examples.src.hello_world.url_expression_files;
|
||||
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Directive, View, NgElement;
|
||||
|
||||
@@ -123,7 +123,8 @@ void allTests() {
|
||||
});
|
||||
});
|
||||
testPhases(config.name, [[transform]], config.assetPathToInputPath,
|
||||
config.assetPathToExpectedOutputPath, []);
|
||||
config.assetPathToExpectedOutputPath, [],
|
||||
StringFormatter.noNewlinesOrSurroundingWhitespace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user