Skip to content

Commit 467b72a

Browse files
authored
Merge pull request #841 from dxc-technology/jialecl-updateInstallation
Updating installation process in Overview page
2 parents b140b58 + eb55bfa commit 467b72a

File tree

5 files changed

+55
-12
lines changed

5 files changed

+55
-12
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
11

2-
npm install -g @angular/cli@10.2.0
2+
npm install -g @angular/cli@13.3.3
33

44
ng new <name-app>
55

66
/* Select SCSS as styling when angular cli ask for it */
77

88
/* Add these dependencies to the projects */
99

10-
npm install @dxc-technology/halstack-angular @angular/[email protected] @angular/[email protected] @angular/[email protected] [email protected] [email protected]
10+
npm install @dxc-technology/halstack-angular @angular/[email protected] @angular/[email protected]
11+
12+
/* The package.json should look like this in the end */
13+
14+
"dependencies": {
15+
"@angular/animations": "~13.2.0",
16+
"@angular/cdk": "^13.3.4",
17+
"@angular/common": "~13.2.0",
18+
"@angular/compiler": "~13.2.0",
19+
"@angular/core": "~13.2.0",
20+
"@angular/forms": "~13.2.0",
21+
"@angular/material": "^13.3.4",
22+
"@angular/platform-browser": "13.2.5",
23+
"@angular/platform-browser-dynamic": "13.2.5",
24+
"@angular/router": "~13.2.0",
25+
"@dxc-technology/halstack-angular": "latest",
26+
"rxjs": "6.6.7",
27+
"tslib": "^2.0.0",
28+
"zone.js": "^0.11.4"
29+
},
30+
"devDependencies": {
31+
"@angular-devkit/build-angular": "~13.2.6",
32+
"@angular/cli": "~13.2.6",
33+
"@angular/compiler-cli": "~13.2.0",
34+
"@types/jasmine": "~3.10.0",
35+
"@types/node": "^12.11.1",
36+
"jasmine-core": "~4.0.0",
37+
"karma": "~6.3.0",
38+
"karma-chrome-launcher": "~3.1.0",
39+
"karma-coverage": "~2.1.0",
40+
"karma-jasmine": "~4.0.0",
41+
"karma-jasmine-html-reporter": "~1.7.0",
42+
"typescript": "~4.5.2"
43+
}

projects/dxc-ngx-cdk-site/src/app/components/examples/overview/overview-install/overview-install-ts.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"compilerOptions": {
3+
// these are required to avoid an error with dayjs
4+
"esModuleInterop": true,
5+
"allowSyntheticDefaultImports": true,
36
// ...
47
// paths are relative to `baseUrl` path.
58
"paths": {

projects/dxc-ngx-cdk-site/src/app/components/overview/overview-install/overview-install.component.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<div class="section">
22
<dxc-heading [level]="3" weight="normal" text="Install"></dxc-heading>
33
<p>
4-
DXC Angular Components is a library made for Angular applications. In order
4+
DXC Angular Components is a library made for Angular 13 applications. In order
55
to use it, you need to include it in an existing Angular project.
66
</p>
77
<p>
8-
If you are creating a Angular application from scratch, we recommend take a look at this boiler plate. It's a clean app consuming halstack angular cdk.
9-
10-
<a href="https://github.com/mawelCaballero/halstack-angular-boiler-plate" target="_blank"
11-
>Clean example app</a
12-
>
13-
otherwise follow the next steps to install from scratch.
8+
If you are creating a Angular application from scratch, we recommend to
9+
follow the next steps to install from scratch.
1410
</p>
1511
<p>
1612
DXC Angular Components is distributed as an npm package. To use it in an
@@ -48,7 +44,8 @@
4844
<a
4945
href="https://angular.io/guide/creating-libraries#use-typescript-path-mapping-for-peer-dependencies"
5046
target="_blank"
51-
>Angular</a>
47+
>Angular</a
48+
>
5249
does it?
5350
</p>
5451
<app-code-playground [code]="tsCode" type="CONSOLE"> </app-code-playground>
@@ -61,15 +58,20 @@
6158
></dxc-heading>
6259

6360
<p>
64-
The cdk uses a Dxc Halstack styling so if it's not added, the components will not
65-
work as expected.
61+
The cdk uses a Dxc Halstack styling so if it's not added, the components
62+
will not work as expected.
6663
</p>
6764
<p>
6865
Furthermore, it is mandatory to add in your angular.json the library assets
6966
as well as the theme from Halstack Angular:
7067
</p>
7168
<app-code-playground [code]="assetsCode" type="CONSOLE">
7269
</app-code-playground>
70+
<p>
71+
Some components make use of some material styling so its is neccessary to add this line to style.scss:
72+
</p>
73+
<app-code-playground [code]="materialThemeCode" type="CONSOLE">
74+
</app-code-playground>
7375
<p>
7476
Lastly, it is also needed our ThemeModule in your app so our default theme
7577
can be applied with the theme directive. For more information, please go to

projects/dxc-ngx-cdk-site/src/app/components/overview/overview-install/overview-install.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class OverviewInstallComponent implements OnInit {
1717
yarnCode: string;
1818
assetsCode: string;
1919
tsCode: string;
20+
materialThemeCode: string;
2021
files: Array<string>;
2122

2223
constructor(
@@ -27,12 +28,14 @@ export class OverviewInstallComponent implements OnInit {
2728
"overview/overview-install/overview-install-yarn",
2829
"overview/overview-install/overview-install-assets",
2930
"overview/overview-install/overview-install-ts",
31+
"overview/overview-install/overview-install-materialTheme"
3032
];
3133

3234
this.npmCode = "Loading...";
3335
this.yarnCode = "Loading...";
3436
this.assetsCode = "Loading...";
3537
this.tsCode = "Loading ...";
38+
this.materialThemeCode = "Loading ...";
3639
}
3740
ngOnInit() {
3841
this.getExampleFiles();
@@ -46,6 +49,7 @@ export class OverviewInstallComponent implements OnInit {
4649
this.yarnCode = response[1];
4750
this.assetsCode = response[2];
4851
this.tsCode = response[3];
52+
this.materialThemeCode = response[4];
4953
});
5054
}
5155
}

0 commit comments

Comments
 (0)