Skip to content

Commit 9ef2bda

Browse files
mheveryIgorMinar
authored andcommitted
WIP: code cleanup
1 parent 5f13ab1 commit 9ef2bda

File tree

78 files changed

+361
-355
lines changed

Some content is hidden

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

78 files changed

+361
-355
lines changed

build.sh

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,27 @@ do
3232
echo "====== (esm)COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json ====="
3333
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json
3434

35-
echo "====== BUNDLING: ${SRCDIR} ====="
36-
(
37-
cd ${SRCDIR}
38-
echo "..." # here just to have grep match something and not exit with 1
39-
../../rollup-test/node_modules/.bin/rollup -c rollup.config.js
40-
) 2>&1 | grep -v "as external dependency"
41-
42-
# workaround for https://github.com/rollup/rollup/issues/626
43-
sed -i '' "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
44-
45-
$(npm bin)/tsc \
46-
--out ${UMDES5PATH} \
47-
--target es5 \
48-
--allowJs \
49-
${UMDES6PATH} \
50-
modules/\@angular/manual_typings/globals.d.ts \
51-
modules/\@angular/typings/es6-collections/es6-collections.d.ts \
52-
modules/\@angular/typings/es6-promise/es6-promise.d.ts
53-
rm ${UMDES6PATH}
35+
if (true); then
36+
echo "====== BUNDLING: ${SRCDIR} ====="
37+
(
38+
cd ${SRCDIR}
39+
echo "..." # here just to have grep match something and not exit with 1
40+
../../../node_modules/.bin/rollup -c rollup.config.js
41+
) 2>&1 | grep -v "as external dependency"
42+
43+
# workaround for https://github.com/rollup/rollup/issues/626
44+
sed -i '' "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
45+
46+
$(npm bin)/tsc \
47+
--out ${UMDES5PATH} \
48+
--target es5 \
49+
--allowJs \
50+
${UMDES6PATH} \
51+
modules/\@angular/manual_typings/globals.d.ts \
52+
modules/\@angular/typings/es6-collections/es6-collections.d.ts \
53+
modules/\@angular/typings/es6-promise/es6-promise.d.ts
54+
rm ${UMDES6PATH}
55+
fi
5456
done
5557

5658
TSCONFIG=./modules/@angular/tsconfig.json

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ gulp.task('test.unit.cjs/ci', function(done) {
896896
runJasmineTests(['dist/js/cjs/{angular2,benchpress}/test/**/*_spec.js'], done);
897897
});
898898

899-
gulp.task('check-public-api',
899+
gulp.task('check-public-api', ['build.tools'],
900900
function(done) { runJasmineTests(['dist/tools/public_api_guard/**/*_spec.js'], done); });
901901

902902
gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function(neverDone) {

modules/@angular/common/src/common_directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ import {CORE_DIRECTIVES} from './directives';
4545
* }
4646
* ```
4747
*/
48-
export const COMMON_DIRECTIVES: Type[][] = /*@ts2dart_const*/ ([CORE_DIRECTIVES, FORM_DIRECTIVES]);
48+
export const COMMON_DIRECTIVES: Type[][] = /*@ts2dart_const*/ [CORE_DIRECTIVES, FORM_DIRECTIVES];

modules/@angular/common/src/directives/core_directives.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {NgPlural, NgPluralCase} from './ng_plural';
4747
* }
4848
* ```
4949
*/
50-
export const CORE_DIRECTIVES: Type[] = /*@ts2dart_const*/ ([
50+
export const CORE_DIRECTIVES: Type[] = /*@ts2dart_const*/ [
5151
NgClass,
5252
NgFor,
5353
NgIf,
@@ -58,4 +58,4 @@ export const CORE_DIRECTIVES: Type[] = /*@ts2dart_const*/ ([
5858
NgSwitchDefault,
5959
NgPlural,
6060
NgPluralCase
61-
]);
61+
];

modules/@angular/common/src/directives/ng_switch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Directive, Host, ViewContainerRef, TemplateRef} from '@angular/core';
22
import {isPresent, isBlank, normalizeBlank} from '@angular/facade';
33
import {ListWrapper, Map} from '@angular/facade';
44

5-
const _WHEN_DEFAULT = /*@ts2dart_const*/ (new Object());
5+
const _WHEN_DEFAULT = /*@ts2dart_const*/ new Object();
66

77
export class SwitchView {
88
constructor(private _viewContainerRef: ViewContainerRef, private _templateRef: TemplateRef) {}

modules/@angular/common/src/forms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {Type} from '@angular/core';
5252
* bootstrap(MyApp, [FORM_PROVIDERS]);
5353
* ```
5454
*/
55-
export const FORM_PROVIDERS: Type[] = /*@ts2dart_const*/ ([FormBuilder, RadioControlRegistry]);
55+
export const FORM_PROVIDERS: Type[] = /*@ts2dart_const*/ [FormBuilder, RadioControlRegistry];
5656

5757
/**
5858
* See {@link FORM_PROVIDERS} instead.

modules/@angular/common/src/forms/directives.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export {ControlValueAccessor} from './directives/control_value_accessor';
6464
* class MyApp {}
6565
* ```
6666
*/
67-
export const FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/ ([
67+
export const FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/ [
6868
NgControlName,
6969
NgControlGroup,
7070

@@ -85,4 +85,4 @@ export const FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/ ([
8585
MinLengthValidator,
8686
MaxLengthValidator,
8787
PatternValidator
88-
]);
88+
];

modules/@angular/common/src/forms/directives/checkbox_value_accessor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {Directive, Renderer, ElementRef, Self, forwardRef, Provider} from '@angular/core';
22
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
33

4-
const CHECKBOX_VALUE_ACCESSOR = /*@ts2dart_const*/ ({
4+
const CHECKBOX_VALUE_ACCESSOR = /*@ts2dart_const*/ {
55
provide: NG_VALUE_ACCESSOR,
66
useExisting: forwardRef(() => CheckboxControlValueAccessor),
77
multi: true
8-
});
8+
};
99

1010
/**
1111
* The accessor for writing a value and listening to changes on a checkbox input element.

modules/@angular/common/src/forms/directives/control_value_accessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ export interface ControlValueAccessor {
3030
*
3131
* See {@link DefaultValueAccessor} for how to implement one.
3232
*/
33-
export const NG_VALUE_ACCESSOR: OpaqueToken = /*@ts2dart_const*/ (new OpaqueToken("NgValueAccessor"));
33+
export const NG_VALUE_ACCESSOR: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken("NgValueAccessor");

modules/@angular/common/src/forms/directives/default_value_accessor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {Directive, ElementRef, Renderer, Self, forwardRef, Provider} from '@angu
22
import {isBlank} from '@angular/facade';
33
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
44

5-
const DEFAULT_VALUE_ACCESSOR = /*@ts2dart_const*/ (
6-
{provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DefaultValueAccessor), multi: true});
5+
const DEFAULT_VALUE_ACCESSOR = /*@ts2dart_const*/
6+
{provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DefaultValueAccessor), multi: true};
77

88
/**
99
* The default accessor for writing a value and listening to changes that is used by the

0 commit comments

Comments
 (0)