chore(transform): move transform module to modules_dart
The build/pure-packages.dart gulp task has also been updated to move the files into the angular2 tree. Closes #3729
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
library angular2.test.transform.directive_linker.all_tests;
|
||||
|
||||
import 'package:barback/barback.dart';
|
||||
import 'package:angular2/src/transform/directive_linker/linker.dart';
|
||||
import 'package:dart_style/dart_style.dart';
|
||||
import 'package:guinness/guinness.dart';
|
||||
|
||||
import '../common/read_file.dart';
|
||||
|
||||
var formatter = new DartFormatter();
|
||||
|
||||
main() => allTests();
|
||||
|
||||
void allTests() {
|
||||
var reader = new TestAssetReader();
|
||||
|
||||
it('should ensure that dependencies are property chained.', () async {
|
||||
for (var inputPath in [
|
||||
'bar.ng_deps.dart',
|
||||
'foo.ng_deps.dart',
|
||||
'index.ng_deps.dart'
|
||||
]) {
|
||||
var expected =
|
||||
readFile('directive_linker/simple_files/expected/$inputPath');
|
||||
inputPath = 'directive_linker/simple_files/$inputPath';
|
||||
var actual = formatter
|
||||
.format(await linkNgDeps(reader, new AssetId('a', inputPath)));
|
||||
expect(actual).toEqual(formatter.format(expected));
|
||||
}
|
||||
});
|
||||
|
||||
it('should ensure that exported dependencies are property chained.',
|
||||
() async {
|
||||
for (var inputPath in [
|
||||
'bar.ng_deps.dart',
|
||||
'foo.ng_deps.dart',
|
||||
'index.ng_deps.dart'
|
||||
]) {
|
||||
var expected =
|
||||
readFile('directive_linker/simple_export_files/expected/$inputPath');
|
||||
inputPath = 'directive_linker/simple_export_files/$inputPath';
|
||||
var actual = formatter
|
||||
.format(await linkNgDeps(reader, new AssetId('a', inputPath)));
|
||||
expect(actual).toEqual(formatter.format(expected));
|
||||
}
|
||||
});
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
library bar.ng_deps.dart;
|
||||
|
||||
import 'bar.dart';
|
||||
export 'bar.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
export 'foo.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[soup]')],
|
||||
const [], () => new MyComponent()));
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
library bar.ng_deps.dart;
|
||||
|
||||
import 'bar.dart';
|
||||
export 'bar.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
export 'foo.dart';
|
||||
import 'foo.ng_deps.dart' as i0;
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[soup]')],
|
||||
const [], () => new MyComponent()));
|
||||
i0.initReflector();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
library foo.ng_deps.dart;
|
||||
|
||||
import 'foo.dart';
|
||||
export 'foo.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
DependencyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[salad]')],
|
||||
const [], () => new DependencyComponent()));
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
library web_foo.ng_deps.dart;
|
||||
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/bootstrap_static.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
import 'bar.ng_deps.dart' as i0;
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
i0.initReflector();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
library foo.ng_deps.dart;
|
||||
|
||||
import 'foo.dart';
|
||||
export 'foo.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
DependencyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[salad]')],
|
||||
const [], () => new DependencyComponent()));
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
library web_foo.ng_deps.dart;
|
||||
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/bootstrap_static.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
library bar.ng_deps.dart;
|
||||
|
||||
import 'bar.dart';
|
||||
export 'bar.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
import 'foo.dart' as dep;
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', viewBindings: const [dep.DependencyComponent])
|
||||
], const [], () => new MyComponent()));
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
library bar.ng_deps.dart;
|
||||
|
||||
import 'bar.dart';
|
||||
export 'bar.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
import 'foo.dart' as dep;
|
||||
import 'foo.ng_deps.dart' as i0;
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
MyComponent,
|
||||
new ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', viewBindings: const [dep.DependencyComponent])
|
||||
], const [], () => new MyComponent()));
|
||||
i0.initReflector();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
library foo.ng_deps.dart;
|
||||
|
||||
import 'foo.dart';
|
||||
export 'foo.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
DependencyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[salad]')],
|
||||
const [], () => new DependencyComponent()));
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
library web_foo.ng_deps.dart;
|
||||
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/bootstrap_static.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
import 'bar.ng_deps.dart' as i0;
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
i0.initReflector();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
library foo.ng_deps.dart;
|
||||
|
||||
import 'foo.dart';
|
||||
export 'foo.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/src/core/metadata.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(
|
||||
DependencyComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[salad]')],
|
||||
const [], () => new DependencyComponent()));
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
library web_foo.ng_deps.dart;
|
||||
|
||||
import 'package:angular2/src/reflection/reflection.dart' as _ngRef;
|
||||
import 'package:angular2/bootstrap_static.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
|
||||
var _visited = false;
|
||||
void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
}
|
Reference in New Issue
Block a user