style(dart): Format with dartfmt v0.2.0
Format all pure Dart code with package:dart_style v0.2.0 Command: ``` find -type f -name "*.dart" | xargs dartformat -w ```
This commit is contained in:
@@ -13,7 +13,8 @@ main() {
|
||||
|
||||
var formatter = new DartFormatter();
|
||||
var transform = new AngularTransformerGroup(new TransformerOptions(
|
||||
['web/index.dart'], reflectionEntryPoints: ['web/index.dart']));
|
||||
['web/index.dart'],
|
||||
reflectionEntryPoints: ['web/index.dart']));
|
||||
|
||||
class IntegrationTestConfig {
|
||||
final String name;
|
||||
@@ -92,14 +93,12 @@ void allTests() {
|
||||
outputs: {
|
||||
'a|web/bar.ng_deps.dart': 'synthetic_ctor_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig('should preserve multiple annotations.',
|
||||
inputs: {
|
||||
new IntegrationTestConfig('should preserve multiple annotations.', inputs: {
|
||||
'a|web/index.dart': 'two_annotations_files/index.dart',
|
||||
'a|web/bar.dart': 'two_annotations_files/bar.dart',
|
||||
'angular2|lib/src/core/annotations_impl/view.dart':
|
||||
'../../../lib/src/core/annotations_impl/view.dart'
|
||||
},
|
||||
outputs: {
|
||||
}, outputs: {
|
||||
'a|web/bar.ng_deps.dart':
|
||||
'two_annotations_files/expected/bar.ng_deps.dart'
|
||||
})
|
||||
@@ -108,7 +107,6 @@ void allTests() {
|
||||
var cache = {};
|
||||
|
||||
for (var config in tests) {
|
||||
|
||||
// Read in input & output files.
|
||||
config.assetPathToInputPath
|
||||
..addAll(commonInputs)
|
||||
@@ -122,8 +120,14 @@ void allTests() {
|
||||
return value.endsWith('dart') ? formatter.format(code) : code;
|
||||
});
|
||||
});
|
||||
testPhases(config.name, [[transform]], config.assetPathToInputPath,
|
||||
config.assetPathToExpectedOutputPath, [],
|
||||
testPhases(
|
||||
config.name,
|
||||
[
|
||||
[transform]
|
||||
],
|
||||
config.assetPathToInputPath,
|
||||
config.assetPathToExpectedOutputPath,
|
||||
[],
|
||||
StringFormatter.noNewlinesOrSurroundingWhitespace);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-3
@@ -11,7 +11,11 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MyComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(componentServices: const [MyContext])],
|
||||
const [const [MyContext]], (MyContext c) => new MyComponent(c)));
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(componentServices: const [MyContext])
|
||||
], const [
|
||||
const [MyContext]
|
||||
], (MyContext c) => new MyComponent(c)));
|
||||
}
|
||||
|
||||
+4
-3
@@ -10,7 +10,8 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MyComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [],
|
||||
() => new MyComponent()));
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[soup]')],
|
||||
const [], () => new MyComponent()));
|
||||
}
|
||||
|
||||
+4
-3
@@ -10,7 +10,8 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MyComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [],
|
||||
() => new MyComponent()));
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[soup]')],
|
||||
const [], () => new MyComponent()));
|
||||
}
|
||||
|
||||
+11
-11
@@ -14,30 +14,30 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MyComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: '[soup]'),
|
||||
const View(template: 'Salad: {{myNum}} is awesome')
|
||||
], const [], () => new MyComponent()))
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: '[soup]'),
|
||||
const View(template: 'Salad: {{myNum}} is awesome')
|
||||
], const [], () => new MyComponent()))
|
||||
..registerGetters({'myNum': (o) => o.myNum})
|
||||
..registerSetters({'myNum': (o, v) => o.myNum = v});
|
||||
_gen.preGeneratedProtoDetectors['MyComponent_comp_0'] =
|
||||
_MyComponent_ChangeDetector0.newProtoChangeDetector;
|
||||
}
|
||||
|
||||
class _MyComponent_ChangeDetector0
|
||||
extends _gen.AbstractChangeDetector<MyComponent> {
|
||||
var myNum0, interpolate1;
|
||||
|
||||
_MyComponent_ChangeDetector0(dispatcher, protos, directiveRecords) : super(
|
||||
"MyComponent_comp_0", dispatcher, protos, directiveRecords,
|
||||
'ALWAYS_CHECK') {
|
||||
_MyComponent_ChangeDetector0(dispatcher, protos, directiveRecords)
|
||||
: super("MyComponent_comp_0", dispatcher, protos, directiveRecords,
|
||||
'ALWAYS_CHECK') {
|
||||
dehydrateDirectives(false);
|
||||
}
|
||||
|
||||
void detectChangesInRecordsInternal(throwOnChange) {
|
||||
var l_context = this.context,
|
||||
l_myNum0,
|
||||
c_myNum0,
|
||||
l_interpolate1;
|
||||
var l_context = this.context, l_myNum0, c_myNum0, l_interpolate1;
|
||||
c_myNum0 = false;
|
||||
var isChanged = false;
|
||||
var changes = null;
|
||||
|
||||
+12
-5
@@ -11,9 +11,16 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MyComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: 'soup')], const [
|
||||
const [prefix.MyContext],
|
||||
const [String]
|
||||
], (prefix.MyContext c, String inValue) => new MyComponent(c, inValue)));
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(selector: 'soup')
|
||||
],
|
||||
const [
|
||||
const [prefix.MyContext],
|
||||
const [String]
|
||||
],
|
||||
(prefix.MyContext c, String inValue) =>
|
||||
new MyComponent(c, inValue)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user