Skip to content

Commit 8aa3fcf

Browse files
committed
chore(build): don’t include export var __esModule = true in every file
But do it during the build process for cjs. Right now we only need this when we transpile from ts directly to es5. This is only the case in our cis build, as for our browser build we only transpile from ts to es6 via ts and then use traceur to do the rest.
1 parent 1beadb8 commit 8aa3fcf

48 files changed

Lines changed: 61 additions & 257 deletions

Some content is hidden

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

modules/angular2/change_detection.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,3 @@ export {
5757
preGeneratedProtoDetectors,
5858
defaultPipeRegistry
5959
} from './src/change_detection/change_detection';
60-
61-
// HACK: workaround for Traceur behavior.
62-
// It expects all transpiled modules to contain this marker.
63-
// TODO: remove this when we no longer use traceur
64-
export var __esModule = true;

modules/angular2/di.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,3 @@ export {
2121
NoAnnotationError
2222
} from './src/di/exceptions';
2323
export {OpaqueToken} from './src/di/opaque_token';
24-
25-
// HACK: workaround for Traceur behavior.
26-
// It expects all transpiled modules to contain this marker.
27-
// TODO: remove this when we no longer use traceur
28-
export var __esModule = true;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
declare var assert: any;
99
declare var global: Window;
10-
type int = number;
10+
declare type int = number;
1111

1212
interface List<T> extends Array<T> {}
1313

14-
interface StringMap<K,V> extends Object {}
14+
interface StringMap<K, V> extends Object {}
1515

1616
interface Window {
1717
Object: typeof Object;

modules/angular2/globals.dart

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/angular2/src/change_detection/abstract_change_detector.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ import {ChangeDetectorRef} from './change_detector_ref';
44
import {ChangeDetector} from './interfaces';
55
import {CHECK_ALWAYS, CHECK_ONCE, CHECKED, DETACHED, ON_PUSH} from './constants';
66

7-
// HACK: workaround for Traceur behavior.
8-
// It expects all transpiled modules to contain this marker.
9-
// TODO: remove this when we no longer use traceur
10-
export var __esModule = true;
11-
127
export class AbstractChangeDetector extends ChangeDetector {
138
lightDomChildren: List<any>;
149
shadowDomChildren: List<any>;

modules/angular2/src/change_detection/binding_record.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import {SetterFn} from 'angular2/src/reflection/types';
33
import {AST} from './parser/ast';
44
import {DirectiveIndex, DirectiveRecord} from './directive_record';
55

6-
// HACK: workaround for Traceur behavior.
7-
// It expects all transpiled modules to contain this marker.
8-
// TODO: remove this when we no longer use traceur
9-
export var __esModule = true;
10-
116
const DIRECTIVE = "directive";
127
const ELEMENT = "element";
138
const TEXT_NODE = "textNode";

modules/angular2/src/change_detection/change_detection.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ import {Injectable} from 'angular2/src/di/decorators';
1414
import {List, StringMapWrapper} from 'angular2/src/facade/collection';
1515
import {isPresent, BaseException} from 'angular2/src/facade/lang';
1616

17-
// HACK: workaround for Traceur behavior.
18-
// It expects all transpiled modules to contain this marker.
19-
// TODO: remove this when we no longer use traceur
20-
export var __esModule = true;
21-
2217
/**
2318
* Structural diffing for `Object`s and `Map`s.
2419
*

modules/angular2/src/change_detection/change_detection_jit_generator.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ import {
2020
RECORD_TYPE_INTERPOLATE
2121
} from './proto_record';
2222

23-
// HACK: workaround for Traceur behavior.
24-
// It expects all transpiled modules to contain this marker.
25-
// TODO: remove this when we no longer use traceur
26-
export var __esModule = true;
27-
2823

2924
/**
3025
* The code generator takes a list of proto records and creates a function/class

modules/angular2/src/change_detection/change_detection_util.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import {ExpressionChangedAfterItHasBeenChecked} from './exceptions';
55
import {WrappedValue} from './pipes/pipe';
66
import {CHECK_ALWAYS, CHECK_ONCE, CHECKED, DETACHED, ON_PUSH} from './constants';
77

8-
// HACK: workaround for Traceur behavior.
9-
// It expects all transpiled modules to contain this marker.
10-
// TODO: remove this when we no longer use traceur
11-
export var __esModule = true;
12-
138
export var uninitialized = new Object();
149

1510
export class SimpleChange {

modules/angular2/src/change_detection/change_detector_ref.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import {ChangeDetector} from './interfaces';
22
import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
33

4-
// HACK: workaround for Traceur behavior.
5-
// It expects all transpiled modules to contain this marker.
6-
// TODO: remove this when we no longer use traceur
7-
export var __esModule = true;
8-
94
/**
105
* Controls change detection.
116
*

0 commit comments

Comments
 (0)