Skip to content

Commit 72a75fd

Browse files
Merge pull request #96 from digipolisantwerp/feature/prod-builds
fix(core) fix styleguide prod build
2 parents f6539d0 + 61438af commit 72a75fd

File tree

19 files changed

+113
-17
lines changed

19 files changed

+113
-17
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ script:
1818
- npm run build
1919
- npm run examples
2020
- npm test
21-
- ng build --base-href "https://digipolisantwerp.github.io/acpaas-ui_angular/"
21+
- ng build --prod --base-href "https://digipolisantwerp.github.io/acpaas-ui_angular/"
2222

2323
deploy:
2424
provider: pages

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
66

77
## Unreleased
88

9+
- `core` fix AOT / Prod builds
10+
911
### Fixed
1012
- `core` Fixed an issue where an unwanted 404 was shown when the styleguide was reloaded on GitHub pages.
1113

angular.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@
121121
},
122122
"configurations": {
123123
"examples": {
124-
"project": "packages/agenda/ng-package.json",
125-
"tsConfig": "packages/agenda/tsconfig.json"
124+
"project": "packages/agenda/examples/ng-package.json",
125+
"tsConfig": "packages/agenda/examples/tsconfig.json"
126126
}
127127
}
128128
},
@@ -852,4 +852,4 @@
852852
"typescriptMismatch": false
853853
}
854854
}
855-
}
855+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../../examples/agenda",
4+
"deleteDestPath": true
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "@acpaas-ui/ngx-examples/agenda"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
import { AgendaModule } from '@acpaas-ui/ngx-components/agenda';
4+
import { CodeSnippetModule } from '@acpaas-ui/ngx-components/code-snippet';
5+
6+
import { Pages } from './pages/index';
7+
8+
@NgModule({
9+
imports: [
10+
CommonModule,
11+
AgendaModule,
12+
CodeSnippetModule,
13+
],
14+
declarations: [
15+
Pages,
16+
],
17+
})
18+
export class AgendaExamplesModule {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Routes } from '@angular/router';
2+
3+
import { AgendaDemoPageComponent } from './pages/demo/demo.page';
4+
5+
export const AGENDA_EXAMPLES_ROUTES: Routes = [
6+
{
7+
path: '',
8+
component: AgendaDemoPageComponent,
9+
pathMatch: 'full',
10+
},
11+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { AgendaDemoPageComponent } from './pages/demo/demo.page';
2+
export { AgendaExamplesModule } from './agenda.module';
3+
export { AGENDA_EXAMPLES_ROUTES } from './agenda.routes';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<h1 class="h3 u-margin-bottom">Agenda</h1>
2+
<div class="u-margin-bottom">
3+
<!-- <aui-code-snippet [codeSnippet]="javascript1"></aui-code-snippet> -->
4+
T.B.D.
5+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
templateUrl: './demo.page.html',
5+
})
6+
export class AgendaDemoPageComponent {
7+
public javascript1 = `import { AgendaModule } from '@acpaas-ui/ngx-components/analytics';
8+
9+
@NgModule({
10+
imports: [
11+
AgendaModule
12+
]
13+
});
14+
15+
export class AppModule {};`;
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { AgendaDemoPageComponent } from './demo/demo.page';
2+
3+
export const Pages = [
4+
AgendaDemoPageComponent,
5+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './agenda/index';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"extends": "../../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../../out-tsc/lib",
5+
"target": "es2015",
6+
"module": "es2015",
7+
"moduleResolution": "node",
8+
"declaration": true,
9+
"sourceMap": true,
10+
"inlineSources": true,
11+
"emitDecoratorMetadata": true,
12+
"experimentalDecorators": true,
13+
"importHelpers": true,
14+
"types": [],
15+
"lib": [
16+
"dom",
17+
"es2015"
18+
]
19+
},
20+
"angularCompilerOptions": {
21+
"annotateForClosureCompiler": true,
22+
"skipTemplateCodegen": true,
23+
"strictMetadataEmit": true,
24+
"fullTemplateTypeCheck": true,
25+
"strictInjectionParameters": true,
26+
"flatModuleId": "AUTOGENERATED",
27+
"flatModuleOutFile": "AUTOGENERATED"
28+
}
29+
}

packages/agenda/src/lib/agenda/services/sorting.service.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
22

33
import { EventInterface } from '../types/agenda.types';
44
import { DateHelperService } from './date-helper.service';
5-
import { EventMap } from '../classes/event-map.class';
65

76
@Injectable()
87
export class SortingService {

packages/agenda/tsconfig.lib.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"skipTemplateCodegen": true,
2323
"strictMetadataEmit": true,
2424
"fullTemplateTypeCheck": true,
25-
"strictInjectionParameters": true
25+
"strictInjectionParameters": true,
26+
"flatModuleId": "AUTOGENERATED",
27+
"flatModuleOutFile": "AUTOGENERATED"
2628
},
2729
"exclude": [
2830
"src/test.ts",
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"name": "@acpaas-ui/ngx-examples/agenda"
3-
}
2+
"name": "@acpaas-ui/ngx-examples/analytics"
3+
}

packages/localstorage/src/lib/localstorage/localstorage.module.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NgModule, ModuleWithProviders } from '@angular/core';
2-
import { WINDOW } from '@acpaas-ui/ngx-components/utils';
2+
import { WindowModule, WINDOW_PROVIDERS } from '@acpaas-ui/ngx-components/utils';
33

44
import {
55
LocalstorageConfig,
@@ -14,10 +14,11 @@ import {
1414

1515
@NgModule({
1616
imports: [
17+
WindowModule,
1718
],
1819
providers: [
1920
{ provide: LOCALSTORAGE_CONFIG, useValue: DEFAULT_LOCALSTORAGE_CONFIG },
20-
{ provide: WINDOW, useValue: window },
21+
...WINDOW_PROVIDERS,
2122
LocalstorageService,
2223
],
2324
})
@@ -29,13 +30,9 @@ export class LocalstorageModule {
2930
ngModule: LocalstorageModule,
3031
providers: [
3132
{ provide: LOCALSTORAGE_CONFIG, useValue: localstorageConfig },
32-
{ provide: WINDOW, useValue: window },
33+
...WINDOW_PROVIDERS,
3334
LocalstorageService,
3435
],
3536
};
3637
}
37-
38-
constructor(
39-
private localstorageService: LocalstorageService
40-
) {}
4138
}

packages/localstorage/src/lib/localstorage/services/localstorage.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
44
import 'rxjs/add/operator/distinctUntilChanged';
55
import 'rxjs/add/operator/map';
66

7-
import { LOCALSTORAGE_CONFIG, DEFAULT_LOCALSTORAGE_CONFIG } from '../localstorage.conf';
7+
import { LOCALSTORAGE_CONFIG } from '../localstorage.conf';
88
import { Selector, PathSelector, Comparator, LocalstorageConfig } from '../types/localstorage.types';
99
import { LocalstorageHelper } from '../localstorage.helper';
1010
import memoryStorage from '../localstorage.polyfill';

packages/table/examples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"name": "@acpaas-ui/ngx-examples/utils"
2+
"name": "@acpaas-ui/ngx-examples/table"
33
}

0 commit comments

Comments
 (0)