build: switch playground examples to bazel (#28490)

Currently all playground examples are built with `tsc`
and served with the `gulp serve` task. In order to be able
to test these examples easily with Ivy, we now build and
serve the examples using Bazel. This allows us to expand our
Ivy test coverage and additionally it allows us to move forward
with the overall Bazel migration. Building & serving individual
examples is now very easy and doesn't involve building everything
inside of `/modules`.

PR Close #28490
This commit is contained in:
Paul Gschwendtner
2019-02-01 14:27:13 +01:00
committed by Matias Niemelä
parent b7738ef9e4
commit e4fb93c28a
110 changed files with 1135 additions and 475 deletions

View File

@ -0,0 +1,20 @@
/**
* @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
*/
// Workaround for an issue where RxJS cannot be used with UMD bundles only. This is because
// rxjs only ships one UMD bundle and expects everyone to only use the named "rxjs" AMD module.
// Since our code internally loads operators from "rxjs/operators/index", we need to make sure
// that we re-export all operators from the UMD module. This is a small trade-off for not loading
// all rxjs files individually.
if (typeof define === 'function' && define.amd) {
define(['exports', 'rxjs'], (exports, rxjs) => {
// Re-export all operators in this AMD module.
Object.assign(exports, rxjs.operators);
});
}