refactor: improve tree shaking abilities

Internal refactor completed in order to improve tree shaking and dead
code removal. The public API, with an exception to ion-slides, has
stayed the same. However, internally many changes were required so
bundlers could better exclude modules which should not be bundled.
Ultimately most changes resorted to removing references to `window` or
`document`, or a module that referenced one of those.

BREAKING CHANGES

ion-slides was refactored to remove the external dependencies, and
rewritten in TypeScript/ES6 modules to again improve tree shaking
abilities.
This commit is contained in:
Adam Bradley
2017-01-09 09:51:39 -06:00
parent 13cf6a6cb7
commit 7000b1b173
191 changed files with 9401 additions and 13664 deletions

View File

@ -1,7 +1,7 @@
import { ComponentRef, ElementRef, EventEmitter, Output, Renderer } from '@angular/core';
import { Footer, Header } from '../components/toolbar/toolbar';
import { isPresent, assign } from '../util/util';
import { isPresent } from '../util/util';
import { Navbar } from '../components/navbar/navbar';
import { NavController } from './nav-controller';
import { NavOptions, ViewState } from './nav-util';
@ -79,6 +79,16 @@ export class ViewController {
*/
willUnload: EventEmitter<any> = new EventEmitter();
/**
* @private
*/
readReady: EventEmitter<any> = new EventEmitter<any>();
/**
* @private
*/
writeReady: EventEmitter<any> = new EventEmitter<any>();
/** @private */
data: any;
@ -160,7 +170,7 @@ export class ViewController {
this._dismissData = data;
this._dismissRole = role;
const options = assign({}, this._leavingOpts, navOptions);
const options = Object.assign({}, this._leavingOpts, navOptions);
return this._nav.removeView(this, options).then(() => data);
}