X Tutup
Skip to content

Commit 2f94c7d

Browse files
mheveryIgorMinar
authored andcommitted
WIP: added mock package
1 parent b0b2b8e commit 2f94c7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+244
-75
lines changed

build.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,23 @@ for PACKAGE in \
88
common \
99
http \
1010
platform-browser \
11-
platform-server
11+
platform-server \
12+
router \
13+
mock
1214
do
1315
SRCDIR=./modules/angular2/${PACKAGE}
1416
DESTDIR=./dist/packages-dist/${PACKAGE}
15-
echo "====== COMPILING: ${SRCDIR}/tsconfig.json ====="
17+
18+
echo "====== COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json ====="
1619
rm -rf ${DESTDIR}
1720
$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json
1821
cp ${SRCDIR}/package.json ${DESTDIR}/
1922

20-
echo "====== COMPILING: ${SRCDIR}/tsconfig-es2015.json ====="
23+
echo "====== COMPILING(esm): \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json ====="
2124
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json
2225
done
2326

2427
TSCONFIG=./modules/angular2/tsconfig.json
25-
echo "====== COMPILING: ${TSCONFIG} ====="
28+
echo "====== COMPILING(all): \$(npm bin)/tsc -p ${TSCONFIG} ====="
2629
rm -rf ./dist/packages-all/
2730
$(npm bin)/tsc -p ${TSCONFIG}

modules/@angular

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
angular2

modules/angular2/animate/testing.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/angular2/core/private_export.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ export './src/core/render/api.dart' show RenderDebugInfo;
1414
export './src/core/linker/template_ref.dart' show TemplateRef_;
1515
export './src/core/profile/wtf_init.dart' show wtfInit;
1616
export './src/core/reflection/reflection_capabilities.dart' show ReflectionCapabilities;
17+
export './src/util/decorators' show makeDecorator;

modules/angular2/mock/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './mock';

modules/angular2/mock/mock.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export * from './src/animation_builder_mock';
2+
export * from './src/directive_resolver_mock';
3+
export * from './src/location_mock';
4+
export * from './src/mock_application_ref';
5+
export * from './src/mock_location_strategy';
6+
export * from './src/ng_zone_mock';
7+
export * from './src/view_resolver_mock';

modules/angular2/mock/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@angular/mock",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "mock.js",
6+
"jsnext:main": "esm/mock.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"dependencies": {
11+
"reflect-metadata": "^0.1.2",
12+
"rxjs": "5.0.0-beta.2",
13+
"zone.js": "^0.6.6",
14+
"@angular/core": "*",
15+
"@angular/common": "*",
16+
"@angular/compiler": "*"
17+
}
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export '../core/private_export.dart';
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {__platform_browser_private__ as _} from '@angular/platform-browser';
2+
3+
export type AnimationBuilder = _.AnimationBuilder;
4+
export var AnimationBuilder: typeof _.AnimationBuilder = _.AnimationBuilder;
5+
6+
export type CssAnimationBuilder = _.CssAnimationBuilder;
7+
export var CssAnimationBuilder: typeof _.CssAnimationBuilder = _.CssAnimationBuilder;
8+
9+
export type CssAnimationOptions = _.CssAnimationOptions;
10+
export var CssAnimationOptions: typeof _.CssAnimationOptions = _.CssAnimationOptions;
11+
12+
export type Animation = _.Animation;
13+
export var Animation: typeof _.Animation = _.Animation;
14+
15+
export type BrowserDetails = _.BrowserDetails;
16+
export var BrowserDetails: typeof _.BrowserDetails = _.BrowserDetails;

modules/angular2/src/mock/animation_builder_mock.ts renamed to modules/angular2/mock/src/animation_builder_mock.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import {Injectable} from 'angular2/src/core/di';
2-
import {AnimationBuilder} from 'angular2/src/animate/animation_builder';
3-
import {CssAnimationBuilder} from 'angular2/src/animate/css_animation_builder';
4-
import {CssAnimationOptions} from 'angular2/src/animate/css_animation_options';
5-
import {Animation} from 'angular2/src/animate/animation';
6-
import {BrowserDetails} from 'angular2/src/animate/browser_details';
1+
import {Injectable} from '@angular/core';
2+
import {
3+
AnimationBuilder,
4+
CssAnimationBuilder,
5+
Animation,
6+
BrowserDetails,
7+
CssAnimationOptions
8+
} from '../platform_browser_private';
79

810
@Injectable()
911
export class MockAnimationBuilder extends AnimationBuilder {

0 commit comments

Comments
 (0)
X Tutup