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

@ -41,7 +41,7 @@ class Order {
let _nextId = 1000;
@Injectable()
class DataService {
export class DataService {
orderItems: OrderItem[];
orders: Order[];
currentOrder: Order = null;
@ -104,7 +104,7 @@ class DataService {
</div>
`
})
class OrderListComponent {
export class OrderListComponent {
orders: Order[];
constructor(private _service: DataService) { this.orders = _service.orders; }
@ -137,7 +137,7 @@ class OrderListComponent {
</div>
`
})
class OrderItemComponent {
export class OrderItemComponent {
@Input() item: OrderItem;
@Output() delete = new EventEmitter();
@ -173,7 +173,7 @@ class OrderItemComponent {
</div>
`
})
class OrderDetailsComponent {
export class OrderDetailsComponent {
constructor(private _service: DataService) {}
get order(): Order { return this._service.currentOrder; }
@ -191,7 +191,7 @@ class OrderDetailsComponent {
<order-details-cmp></order-details-cmp>
`
})
class OrderManagementApplication {
export class OrderManagementApplication {
}
@NgModule({
@ -200,9 +200,7 @@ class OrderManagementApplication {
[OrderManagementApplication, OrderListComponent, OrderDetailsComponent, OrderItemComponent],
imports: [BrowserModule, FormsModule]
})
class ExampleModule {
export class ExampleModule {
}
export function main() {
platformBrowserDynamic().bootstrapModule(ExampleModule);
}
platformBrowserDynamic().bootstrapModule(ExampleModule);