Skip to content

build: serve ivy dev-app with lazy loading #15557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
/src/dev-app/connected-overlay/** @jelbourn @crisbeto
/src/dev-app/dataset/** @andrewseguin
/src/dev-app/datepicker/** @mmalerba
/src/dev-app/dev-app-layout/** @mmalerba
/src/dev-app/dev-app/** @mmalerba
/src/dev-app/dialog/** @jelbourn @crisbeto
/src/dev-app/drag-drop/** @crisbeto
/src/dev-app/drawer/** @mmalerba
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@
"node-sass": "^4.11.0",
"parse5": "^5.0.0",
"protractor": "^5.4.1",
"requirejs": "^2.3.6",
"resolve-bin": "^0.4.0",
"rollup": "^0.56.3",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-node-resolve": "^3.0.3",
"rollup": "^1.7.0",
"rollup-plugin-alias": "^1.5.1",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.1",
"run-sequence": "^1.2.2",
"scss-bundle": "^2.0.1-beta.7",
"selenium-webdriver": "^3.6.0",
Expand Down
14 changes: 6 additions & 8 deletions scripts/ivy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ set -e

echo ">>> Build Material"
rm -rf dist
gulp build:devapp
yarn gulp build:devapp

echo ">>> Rebuild dev-app with ngtsc"
node_modules/.bin/ngc -p src/dev-app/tsconfig-build.json

echo ">>> Bundle demo-app with SystemJS"
node ./src/dev-app/systemjs-bundle.js
echo ">>> Bundling dev-app with Rollup"
node ./src/dev-app/rollup-bundles.js

echo ">>> Assembling app"
mkdir dist/demo
cp dist/packages/dev-app/bundle.js dist/demo
echo ">>> Copying assets to output"
cp src/dev-app/index.html dist/demo
cp dist/packages/dev-app/theme.css dist/demo
cp 'node_modules/@webcomponents/custom-elements/custom-elements.min.js' dist/demo
cp node_modules/core-js/client/core.js dist/demo
cp node_modules/systemjs/dist/system.src.js dist/demo
cp node_modules/requirejs/require.js dist/demo
cp node_modules/zone.js/dist/zone.js dist/demo
cp node_modules/hammerjs/hammer.min.js dist/demo

echo ">>> Done."
echo "Output: $(pwd)/dist/demo"
echo "Output: $(pwd)/dist/demo"
1 change: 1 addition & 0 deletions scripts/ivy/install-angular.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function build_angular_packages() {
function install_angular_package() {
name=$1
echo " @angular/$name"
rm -Rf "node_modules/@angular/${name}"
cp -r "${output_path}/${name}/npm_package" "node_modules/@angular/${name}"
}

Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/autocomplete/autocomplete-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
MatFormFieldModule,
MatInputModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {AutocompleteDemo} from './autocomplete-demo';

@NgModule({
Expand All @@ -28,6 +29,7 @@ import {AutocompleteDemo} from './autocomplete-demo';
MatFormFieldModule,
MatInputModule,
ReactiveFormsModule,
RouterModule.forChild([{path: '', component: AutocompleteDemo}]),
],
declarations: [AutocompleteDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/badge/badge-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatBadgeModule, MatButtonModule, MatIconModule} from '@angular/material';
import {RouterModule} from '@angular/router';
import {BadgeDemo} from './badge-demo';

@NgModule({
Expand All @@ -19,6 +20,7 @@ import {BadgeDemo} from './badge-demo';
MatBadgeModule,
MatButtonModule,
MatIconModule,
RouterModule.forChild([{path: '', component: BadgeDemo}]),
],
declarations: [BadgeDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/baseline/baseline-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
MatSelectModule,
MatToolbarModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {BaselineDemo} from './baseline-demo';

@NgModule({
Expand All @@ -29,6 +30,7 @@ import {BaselineDemo} from './baseline-demo';
MatRadioModule,
MatSelectModule,
MatToolbarModule,
RouterModule.forChild([{path: '', component: BaselineDemo}]),
],
declarations: [BaselineDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/bottom-sheet/bottom-sheet-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
MatListModule,
MatSelectModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {BottomSheetDemo, ExampleBottomSheet} from './bottom-sheet-demo';

@NgModule({
Expand All @@ -35,6 +36,7 @@ import {BottomSheetDemo, ExampleBottomSheet} from './bottom-sheet-demo';
MatInputModule,
MatListModule,
MatSelectModule,
RouterModule.forChild([{path: '', component: BottomSheetDemo}]),
],
declarations: [BottomSheetDemo, ExampleBottomSheet],
entryComponents: [ExampleBottomSheet],
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/button-toggle/button-toggle-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatButtonToggleModule, MatCheckboxModule, MatIconModule} from '@angular/material';
import {RouterModule} from '@angular/router';
import {ButtonToggleDemo} from './button-toggle-demo';

@NgModule({
Expand All @@ -19,6 +20,7 @@ import {ButtonToggleDemo} from './button-toggle-demo';
MatButtonToggleModule,
MatCheckboxModule,
MatIconModule,
RouterModule.forChild([{path: '', component: ButtonToggleDemo}]),
],
declarations: [ButtonToggleDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/button/button-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

import {NgModule} from '@angular/core';
import {MatButtonModule, MatIconModule} from '@angular/material';
import {RouterModule} from '@angular/router';
import {ButtonDemo} from './button-demo';

@NgModule({
imports: [
MatButtonModule,
MatIconModule,
RouterModule.forChild([{path: '', component: ButtonDemo}]),
],
declarations: [ButtonDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/card/card-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
MatDividerModule,
MatProgressBarModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {CardDemo} from './card-demo';

@NgModule({
Expand All @@ -21,6 +22,7 @@ import {CardDemo} from './card-demo';
MatCardModule,
MatDividerModule,
MatProgressBarModule,
RouterModule.forChild([{path: '', component: CardDemo}]),
],
declarations: [CardDemo],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/checkbox/checkbox-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatCheckboxModule, MatPseudoCheckboxModule} from '@angular/material';
import {RouterModule} from '@angular/router';
import {CheckboxDemo, MatCheckboxDemoNestedChecklist} from './checkbox-demo';

@NgModule({
Expand All @@ -18,6 +19,7 @@ import {CheckboxDemo, MatCheckboxDemoNestedChecklist} from './checkbox-demo';
FormsModule,
MatCheckboxModule,
MatPseudoCheckboxModule,
RouterModule.forChild([{path: '', component: CheckboxDemo}]),
],
declarations: [CheckboxDemo, MatCheckboxDemoNestedChecklist],
})
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/chips/chips-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
MatIconModule,
MatToolbarModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {ChipsDemo} from './chips-demo';

@NgModule({
Expand All @@ -31,6 +32,7 @@ import {ChipsDemo} from './chips-demo';
MatFormFieldModule,
MatIconModule,
MatToolbarModule,
RouterModule.forChild([{path: '', component: ChipsDemo}]),
],
declarations: [ChipsDemo],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatButtonModule, MatCheckboxModule, MatRadioModule} from '@angular/material';
import {RouterModule} from '@angular/router';
import {ConnectedOverlayDemo} from './connected-overlay-demo';

@NgModule({
Expand All @@ -21,6 +22,7 @@ import {ConnectedOverlayDemo} from './connected-overlay-demo';
MatCheckboxModule,
MatRadioModule,
OverlayModule,
RouterModule.forChild([{path: '', component: ConnectedOverlayDemo}]),
],
declarations: [ConnectedOverlayDemo],
})
Expand Down
4 changes: 4 additions & 0 deletions src/dev-app/datepicker/datepicker-demo-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import {
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatNativeDateModule,
MatSelectModule
} from '@angular/material';
import {RouterModule} from '@angular/router';
import {CustomHeader, CustomHeaderNgContent, DatepickerDemo} from './datepicker-demo';

@NgModule({
Expand All @@ -30,8 +32,10 @@ import {CustomHeader, CustomHeaderNgContent, DatepickerDemo} from './datepicker-
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatNativeDateModule,
MatSelectModule,
ReactiveFormsModule,
RouterModule.forChild([{path: '', component: DatepickerDemo}]),
],
declarations: [CustomHeader, CustomHeaderNgContent, DatepickerDemo],
entryComponents: [CustomHeader, CustomHeaderNgContent],
Expand Down
133 changes: 0 additions & 133 deletions src/dev-app/dev-app-module.ts

This file was deleted.

Loading