Skip to content

Commit

Permalink
feat: update to Angular 9 (#2236)
Browse files Browse the repository at this point in the history
We no longer have a direct depedency on tslib. Instead it is now listed a peerDependency. This matches Angular framework.

Users not using the Angular CLI will need to manually install tslib via:
```
yarn add tslib
# or
npm install tslib --save
```
  • Loading branch information
yggg authored Mar 2, 2020
1 parent 3642948 commit 899815f
Show file tree
Hide file tree
Showing 116 changed files with 14,246 additions and 5,405 deletions.
26 changes: 22 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -30,12 +31,17 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand Down Expand Up @@ -126,6 +132,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -145,12 +152,17 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand Down Expand Up @@ -238,6 +250,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "docs/dist",
"index": "docs/index.html",
"main": "docs/main.ts",
Expand Down Expand Up @@ -266,12 +279,17 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand Down Expand Up @@ -360,7 +378,7 @@
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
Expand Down
3 changes: 2 additions & 1 deletion docs/app/@theme/services/structure.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class NgdStructureService {
}

if (item.block === 'markdown') {
item.children = this.textService.mdToSectionsHTML(require(`raw-loader!../../../articles/${item.source}`));
const article = require(`raw-loader!../../../articles/${item.source}`).default;
item.children = this.textService.mdToSectionsHTML(article);
}

if (item.children) {
Expand Down
1 change: 1 addition & 0 deletions docs/app/@theme/styles/themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ $nb-themes: nb-register-theme((
footer-padding: 1.25rem 0,
menu-font-size: 0.95rem,
menu-font-weight: font-weight-normal,
link-text-decoration: none,
), docs-home, default);
/* stylelint-enable max-line-length */

Expand Down
4 changes: 2 additions & 2 deletions docs/app/@theme/theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ import {
],
})
export class NgdThemeModule {
static forRoot(): ModuleWithProviders {
return <ModuleWithProviders>{
static forRoot(): ModuleWithProviders<NgdThemeModule> {
return {
ngModule: NgdThemeModule,
providers: [
NgdHighlightService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NgdExampleView } from '../../enum.example-view';
})
export class NgdLiveExampleBlockComponent implements OnInit, AfterViewInit, OnDestroy {

@ViewChild('iframe', { static: false }) iframe: ElementRef;
@ViewChild('iframe') iframe: ElementRef;
@Input() content: any;
@Input() hasViewSwitch: boolean = false;
@Output() changeView = new EventEmitter<NgdExampleView>();
Expand Down
2 changes: 1 addition & 1 deletion docs/app/documentation/page/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class NgdPageComponent implements OnInit, AfterContentChecked, OnDestroy

currentTabName: string = '';

@ViewChild(NgdTabbedBlockComponent, { static: false }) tabbedBlock: NgdTabbedBlockComponent;
@ViewChild(NgdTabbedBlockComponent) tabbedBlock: NgdTabbedBlockComponent;

constructor(@Inject(NB_WINDOW) private window,
private ngZone: NgZone,
Expand Down
13 changes: 5 additions & 8 deletions docs/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,25 @@
],
"outDir": "../out-tsc/app",
"target": "es5",
"module": "esnext",
"baseUrl": ".",
"types": [],
"types": ["node"],
"paths": {
"@nebular/theme": ["../src/framework/theme/public_api.ts"],
"@nebular/auth": ["../src/framework/auth/public_api.ts"],
"@nebular/security": ["../src/framework/security/public_api.ts"],
"@nebular/eva-icons": ["../src/framework/eva-icons/public_api.ts"]
}
},
"files": [
"main.ts",
"polyfills.ts"
],
"exclude": [
"test.ts",
"**/*.spec.ts",
"../src/framework/**/*.spec.ts",
"assets/**/*.ts",
"dist/**/*",
"../src/framework/**/schematics/**/*"
],
"include": [
"../docs/**/*",
"../src/playground/**/*",
"../src/framework/**/*",
"../src/app/dynamic.component.ts"
]
}
2 changes: 1 addition & 1 deletion docs/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"es2017"
],
"outDir": "../out-tsc/spec",
"module": "commonjs",
"module": "esnext",
"target": "es6",
"baseUrl": "",
"types": [
Expand Down
Loading

0 comments on commit 899815f

Please sign in to comment.