Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
refactor browser/node module load structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion committed May 10, 2017
1 parent 17bf9b5 commit 16247c0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ gulp.task('build/zone.js.d.ts', ['compile-esm'], function() {

// Zone for Node.js environment.
gulp.task('build/zone-node.js', ['compile-esm'], function(cb) {
return generateScript('./lib/node/node.ts', 'zone-node.js', false, cb);
return generateScript('./lib/node/rollup-main.ts', 'zone-node.js', false, cb);
});

// Zone for the browser.
Expand Down
2 changes: 0 additions & 2 deletions lib/browser/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

import '../common/to-string';

import {patchTimer} from '../common/timers';
import {findEventTask, patchClass, patchEventTargetMethods, patchMethod, patchPrototype, zoneSymbol} from '../common/utils';

Expand Down
2 changes: 1 addition & 1 deletion lib/browser/rollup-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/


import '../zone';
import '../common/promise';
import '../common/to-string';
import './browser';
3 changes: 2 additions & 1 deletion lib/mix/rollup-mix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/


import '../zone';
import '../common/promise';
import '../common/to-string';
import '../browser/browser';
import '../node/node';
3 changes: 0 additions & 3 deletions lib/node/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

import '../zone';
import '../common/promise';
import '../common/to-string';
import './events';
import './fs';

Expand Down
12 changes: 12 additions & 0 deletions lib/node/rollup-main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import '../zone';
import '../common/promise';
import '../common/to-string';
import './node';
1 change: 1 addition & 0 deletions test/browser-zone-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import '../lib/common/to-string';
import '../lib/browser/browser';
import '../lib/zone-spec/async-test';
import '../lib/zone-spec/fake-async-test';
Expand Down
2 changes: 2 additions & 0 deletions test/node_entry_point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import './custom_error';

// Setup tests for Zone without microtask support
import '../lib/zone';
import '../lib/common/promise';
import '../lib/common/to-string';
import '../lib/node/node';
import '../lib/zone-spec/async-test';
import '../lib/zone-spec/fake-async-test';
Expand Down

0 comments on commit 16247c0

Please sign in to comment.