@eui/tools 4.15.8 → 5.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 4.15.8
1
+ 5.0.0-rc.4
package/CHANGELOG.md CHANGED
@@ -1,27 +1,37 @@
1
- ## 4.15.8 (2021-09-20)
1
+ ## 5.0.0-rc.4 (2021-09-20)
2
2
 
3
3
  ##### Bug Fixes
4
4
 
5
- * **pre-build:**
6
- * transfer openid files and envTargetFiles to src target only - EUI-2999 [EUI-2999](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-2999) ([ac01259c](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ac01259c13ab814bdf72fdfbc148d6e02e3cc908))
5
+ * **other:**
6
+ * check eui-styles-base on dependencies pulling - adapted from 4.x fixes - EUI-4112 [EUI-4112](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4112) ([cb633675](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/cb633675984b71ad6cf96dce2cfc8cac7d3e53b7))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.0.0-rc.3 (2021-09-08)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * adjusted to lower postcss dependencies and plugins - EUI-4112 [EUI-4112](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4112) ([4caa36b2](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/4caa36b2b3abdb3ee6b0863d840870cac761e0f5))
7
16
 
8
17
  * * *
9
18
  * * *
10
- ## 4.15.7 (2021-09-16)
19
+ ## 5.0.0-rc.2 (2021-09-08)
11
20
 
12
21
  ##### Bug Fixes
13
22
 
14
23
  * **other:**
15
- * keep the default openid-login-config.json file for replacement of dynamic assets/config env files - EUI-2999 [EUI-2999](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-2999) ([a1ddc333](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a1ddc333ec413f4cbbb4e59d8f119d106f5b307d))
24
+ * showcase skeleton adapted for v13 - EUI-4112 [EUI-4112](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4112) ([2c4442b3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2c4442b3274df53e48c0eb9d35317f639402185e))
16
25
 
17
26
  * * *
18
27
  * * *
19
- ## 4.15.6 (2021-09-14)
28
+ ## 5.0.0-rc.1 (2021-09-08)
20
29
 
21
30
  ##### Bug Fixes
22
31
 
23
32
  * **other:**
24
- * no commits metadata found when exception thrown no valid issues found - EUI-2999 [EUI-2999](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-2999) ([b5929a6c](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b5929a6c0639d2eb1edd27cfc887ee3a9a850562))
33
+ * adapted build styles package external lib inclusion - EUI-4112 [EUI-4112](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4112) ([2d4f407f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2d4f407f61d64799f0ce38987445f79081ea7bc9))
34
+ * adaptation for eUI 13.x project and packages - EUI-4112 [EUI-4112](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4112) ([adb2b314](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/adb2b314bf9e80a69ab947cea164d2833eaff12b))
25
35
 
26
36
  * * *
27
37
  * * *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.15.8",
4
- "tag": "latest",
3
+ "version": "5.0.0-rc.4",
4
+ "tag": "next",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
7
7
  "main": "index.js",
@@ -22,29 +22,25 @@
22
22
  "rimraf": "3.0.2",
23
23
  "ncp": "2.0.0",
24
24
  "confluence-api": "1.4.0",
25
- "moment": "2.24.0",
26
- "moment-timezone": "0.5.25",
27
- "sanitize-html": "2.3.3",
25
+ "moment": "2.29.1",
26
+ "moment-timezone": "0.5.33",
28
27
  "npm-run-all": "4.1.5",
29
28
  "figures": "3.2.0",
30
- "xml2js": "0.4.19",
29
+ "xml2js": "0.4.23",
31
30
  "https-proxy-agent": "2.2.3",
32
- "postcss": "7.0.18",
33
- "postcss-cli": "6.1.3",
34
- "autoprefixer": "9.6.1",
35
31
  "jest": "26.6.3",
36
32
  "supertest": "4.0.2",
37
- "memfs": "3.1.2",
38
- "json-server": "0.16.1",
39
- "faker": "4.1.0",
40
- "nodemon": "1.19.0",
33
+ "memfs": "3.2.4",
34
+ "json-server": "0.16.3",
35
+ "faker": "5.5.3",
36
+ "nodemon": "2.0.12",
41
37
  "lowdb": "1.0.0",
42
38
  "event-stream": "3.3.4",
43
- "node-sass-tilde-importer": "1.0.2",
44
- "axios": "0.21.1",
45
39
  "empty-module": "0.0.2",
46
- "pa11y-ci": "2.4.0",
47
40
  "sendmail": "1.6.1",
48
- "node-sass": "4.14.1"
41
+ "sass": "1.39.0",
42
+ "postcss": "7.0.36",
43
+ "cssnano": "4.1.11",
44
+ "autoprefixer": "9.6.1"
49
45
  }
50
46
  }
@@ -1,103 +1,33 @@
1
1
  {
2
- "config": {
3
- "root": "",
4
- "sourceRoot": "apps/@app.name@/src",
5
- "projectType": "application",
6
- "prefix": "app",
7
- "schematics": {
8
- "@schematics/angular:component": {
9
- "styleext": "scss"
10
- }
11
- },
12
- "architect": {
13
- "build": {
14
- "builder": "ngx-build-plus:build",
15
- "options": {
16
- "outputPath": "apps/@app.name@/dist",
17
- "index": "apps/@app.name@/src/_generated/index.html",
18
- "main": "apps/@app.name@/src/_generated/main.ts",
19
- "polyfills": "apps/@app.name@/src/_generated/polyfills.ts",
20
- "tsConfig": "apps/@app.name@/tsconfig.app.json",
21
- "assets": [
22
- "apps/@app.name@/src/_generated/favicon.ico",
23
- "apps/@app.name@/src/assets",
24
- {
25
- "glob": "**/*",
26
- "input": "node_modules/@eui/core/assets/",
27
- "output": "./assets"
28
- }
29
- ],
30
- "styles": [
31
- "node_modules/@eui/styles/dist/styles/eui.css",
32
- "node_modules/@eui/styles/dist/styles/eui-next.css"
33
- ]
34
- },
35
- "configurations": {
36
- "production": {
37
- "fileReplacements": [
38
- {
39
- "replace": "apps/@app.name@/src/_generated/environments/environment.ts",
40
- "with": "apps/@app.name@/src/_generated/environments/environment.prod.ts"
41
- }
42
- ],
43
- "optimization": false,
44
- "outputHashing": "all",
45
- "sourceMap": false,
46
- "extractCss": true,
47
- "namedChunks": true,
48
- "aot": true,
49
- "extractLicenses": true,
50
- "vendorChunk": false,
51
- "buildOptimizer": false,
52
- "budgets": [
53
- {
54
- "type": "initial",
55
- "maximumWarning": "2mb",
56
- "maximumError": "6mb"
57
- }
58
- ]
59
- },
60
- "production-optimized": {
61
- "fileReplacements": [
62
- {
63
- "replace": "apps/@app.name@/src/_generated/environments/environment.ts",
64
- "with": "apps/@app.name@/src/_generated/environments/environment.prod.ts"
65
- }
66
- ],
67
- "optimization": true,
68
- "outputHashing": "all",
69
- "sourceMap": false,
70
- "extractCss": true,
71
- "namedChunks": true,
72
- "aot": true,
73
- "extractLicenses": true,
74
- "vendorChunk": false,
75
- "buildOptimizer": true,
76
- "budgets": [
77
- {
78
- "type": "initial",
79
- "maximumWarning": "2mb",
80
- "maximumError": "6mb"
81
- }
82
- ]
83
- }
84
- }
2
+ "build": {
3
+ "assets": [
4
+ "apps/@app.name@/src/_generated/favicon.ico",
5
+ "apps/@app.name@/src/assets",
6
+ {
7
+ "glob": "**/*",
8
+ "input": "node_modules/@eui/core/assets/",
9
+ "output": "./assets"
85
10
  },
86
- "serve": {
87
- "builder": "@angular-devkit/build-angular:dev-server",
88
- "options": {
89
- "browserTarget": "@app.name@:build"
90
- },
91
- "configurations": {
92
- "proxy-mock": {
93
- "browserTarget": "@app.name@:build",
94
- "proxyConfig": "apps/@app.name@/proxy-mock.conf.json"
95
- },
96
- "production": {
97
- "browserTarget": "@app.name@:build:production"
98
- }
99
- }
11
+ {
12
+ "glob": "**/*",
13
+ "input": "node_modules/@eui/styles-base/src/assets/",
14
+ "output": "./assets"
100
15
  }
101
- }
16
+ ],
17
+ "styles": [
18
+ "node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css",
19
+ "packages/eui/packages/styles/src/styles/eui-showcase-dev-only.scss",
20
+ "packages/eui/packages/styles/src/styles/eui-next-dev-only.scss"
21
+ ],
22
+ "stylesBuild": [
23
+ "node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css",
24
+ "node_modules/@eui/styles/dist/styles/eui-showcase.css",
25
+ "node_modules/@eui/styles/dist/styles/eui-next.css"
26
+ ],
27
+ "scripts": [
28
+ "node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js",
29
+ "node_modules/marked/lib/marked.js",
30
+ "node_modules/prismjs/prism.js"
31
+ ]
102
32
  }
103
33
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "@eui/deps-base": "^10.0.0"
3
+ "@eui/deps-base": "^13.0.0"
4
4
  }
5
5
  }
@@ -1,20 +1,22 @@
1
1
  <eui-app [isSidebarOpen]="true" isSidebarHidden="false">
2
- <eui-toolbar>
3
- <eui-toolbar-logo></eui-toolbar-logo>
4
- <eui-toolbar-app appName="eUI"></eui-toolbar-app>
5
- <eui-toolbar-items euiPositionRight>
6
- <eui-toolbar-item-user-profile>
7
- <eui-user-profile-menu>
8
- <eui-user-profile-menu-item>
9
- <eui-icon iconClass="eui-icon-person-thin"></eui-icon> My profile information
10
- </eui-user-profile-menu-item>
11
- <eui-user-profile-menu-item>
12
- <eui-icon iconClass="eui-icon-logout-thin"></eui-icon> Sign out
13
- </eui-user-profile-menu-item>
14
- </eui-user-profile-menu>
15
- </eui-toolbar-item-user-profile>
16
- </eui-toolbar-items>
17
- </eui-toolbar>
2
+ <eui-app-toolbar>
3
+ <eui-toolbar>
4
+ <eui-toolbar-logo></eui-toolbar-logo>
5
+ <eui-toolbar-app appName="eUI"></eui-toolbar-app>
6
+ <eui-toolbar-items euiPositionRight>
7
+ <eui-toolbar-item-user-profile>
8
+ <eui-user-profile-menu>
9
+ <eui-user-profile-menu-item>
10
+ <eui-icon iconClass="eui-icon-person-thin"></eui-icon> My profile information
11
+ </eui-user-profile-menu-item>
12
+ <eui-user-profile-menu-item>
13
+ <eui-icon iconClass="eui-icon-logout-thin"></eui-icon> Sign out
14
+ </eui-user-profile-menu-item>
15
+ </eui-user-profile-menu>
16
+ </eui-toolbar-item-user-profile>
17
+ </eui-toolbar-items>
18
+ </eui-toolbar>
19
+ </eui-app-toolbar>
18
20
 
19
21
  <eui-app-sidebar>
20
22
  <eui-app-sidebar-body>
@@ -3,5 +3,5 @@ import { Routes } from '@angular/router';
3
3
  export const routes: Routes = [
4
4
  { path: '', redirectTo: 'home', pathMatch: 'full' },
5
5
  { path: 'index.html', redirectTo: 'home', pathMatch: 'full' },
6
- { path: 'home', loadChildren: './features/_home/home.module#Module' },
6
+ { path: 'home', loadChildren: () => import('./features/_home/home.module').then(m => m.Module) },
7
7
  ];
@@ -1,6 +1,6 @@
1
1
  import { NgModule } from '@angular/core';
2
2
 
3
- import { EuiPageModule } from '@eui/components-next';
3
+ import { SharedModule } from '../shared/shared.module';
4
4
 
5
5
  import { HomeRoutingModule } from './home-routing.module';
6
6
  import { HomeComponent } from './home.component';
@@ -8,7 +8,7 @@ import { HomeComponent } from './home.component';
8
8
  @NgModule({
9
9
  imports: [
10
10
  HomeRoutingModule,
11
- EuiPageModule,
11
+ SharedModule,
12
12
  ],
13
13
  declarations: [
14
14
  HomeComponent,
@@ -0,0 +1,15 @@
1
+ import { NgModule } from '@angular/core';
2
+
3
+ import { EuiAllModule } from '@eui/components';
4
+
5
+ @NgModule({
6
+ imports: [
7
+ EuiAllModule,
8
+ ],
9
+ declarations: [
10
+ ],
11
+ exports: [
12
+ EuiAllModule,
13
+ ],
14
+ })
15
+ export class SharedModule {}
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>eUI - UX</title>
7
+ <base href="/">
8
+
9
+ <meta name="viewport" content="width=device-width, initial-scale=1">
10
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
11
+ <script src="https://ec.europa.eu/wel/cookie-consent/consent.js" type="text/javascript" defer></script>
12
+ </head>
13
+
14
+ <body>
15
+ <app-root>
16
+ <div id="loader-wrapper">
17
+ <div id="loader"></div>
18
+ </div>
19
+ </app-root>
20
+ </body>
21
+
22
+ </html>
@@ -132,7 +132,14 @@ const angularProjectDef = {
132
132
  "with": "node_modules/@eui/base/assets/openid/openid-login.js"
133
133
  }
134
134
  ],
135
- "optimization": true,
135
+ "optimization": {
136
+ "scripts": true,
137
+ "styles": {
138
+ "minify": false,
139
+ "inlineCritical": false
140
+ },
141
+ "fonts": true
142
+ },
136
143
  "outputHashing": "all",
137
144
  "sourceMap": false,
138
145
  "extractCss": true,
@@ -156,7 +163,14 @@ const angularProjectDef = {
156
163
  "with": "apps/@project.name@/src/environments/environment.prod.ts"
157
164
  }
158
165
  ],
159
- "optimization": true,
166
+ "optimization": {
167
+ "scripts": true,
168
+ "styles": {
169
+ "minify": false,
170
+ "inlineCritical": false
171
+ },
172
+ "fonts": true
173
+ },
160
174
  "outputHashing": "all",
161
175
  "sourceMap": false,
162
176
  "extractCss": true,
@@ -253,8 +267,6 @@ const angularProjectDefFullSkeleton = {
253
267
  }
254
268
  ],
255
269
  "styles": [
256
- "node_modules/@eui/styles/dist/styles/eui.css",
257
- "node_modules/@eui/styles/dist/styles/eui-next.css"
258
270
  ]
259
271
  },
260
272
  "configurations": {
@@ -289,7 +301,14 @@ const angularProjectDefFullSkeleton = {
289
301
  "with": "apps/@project.name@/src/_generated/environments/environment.prod.ts"
290
302
  }
291
303
  ],
292
- "optimization": true,
304
+ "optimization": {
305
+ "scripts": true,
306
+ "styles": {
307
+ "minify": false,
308
+ "inlineCritical": true
309
+ },
310
+ "fonts": true
311
+ },
293
312
  "outputHashing": "all",
294
313
  "sourceMap": false,
295
314
  "extractCss": true,
@@ -374,7 +393,14 @@ const angularProjectDefConfigurationOptimized = {
374
393
  "with": "node_modules/@eui/base/assets/openid/openid-login.js"
375
394
  }
376
395
  ],
377
- "optimization": true,
396
+ "optimization": {
397
+ "scripts": true,
398
+ "styles": {
399
+ "minify": false,
400
+ "inlineCritical": true
401
+ },
402
+ "fonts": true
403
+ },
378
404
  "outputHashing": "all",
379
405
  "sourceMap": false,
380
406
  "extractCss": true,
@@ -422,6 +448,36 @@ const angularPackageDef = {
422
448
  }
423
449
  };
424
450
 
451
+
452
+ const angularPackageDefv13 = {
453
+ "root": "@path@/@module.name@",
454
+ "sourceRoot": "@path@/@module.name@/src",
455
+ "projectType": "library",
456
+ "prefix": "lib",
457
+ "architect": {
458
+ "build": {
459
+ "builder": "@angular-devkit/build-angular:ng-packagr",
460
+ "options": {
461
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.json",
462
+ "project": "@path@/@module.name@/ng-package.json"
463
+ },
464
+ "configurations": {
465
+ "production": {
466
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.prod.json"
467
+ }
468
+ }
469
+ },
470
+ "test": {
471
+ "builder": "@angular-devkit/build-angular:karma",
472
+ "options": {
473
+ "main": "@path@/@module.name@/src/test.ts",
474
+ "tsConfig": "@path@/@module.name@/tsconfig.spec.json",
475
+ "karmaConfig": "@path@/@module.name@/karma.conf.js"
476
+ }
477
+ }
478
+ }
479
+ };
480
+
425
481
  const angularElementProjectDef = {
426
482
  "root": "@module.name@/",
427
483
  "sourceRoot": "@module.name@/src",
@@ -560,7 +616,12 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
560
616
  pathBase = 'packages/' + pkg.parentPkg + '/packages';
561
617
  }
562
618
 
563
- const projectDef = JSON.stringify(angularPackageDef);
619
+ let projectDef = JSON.stringify(angularPackageDef);
620
+
621
+ if (pkg.build && pkg.build.euiVersion === '13.x') {
622
+ projectDef = JSON.stringify(angularPackageDefv13);
623
+ }
624
+
564
625
  const replaceModule = tools.replaceAll(projectDef, '@module.name@', pkg.folder || pkg.name);
565
626
  const replacePath = tools.replaceAll(replaceModule, '@path@', pathBase);
566
627
 
@@ -199,7 +199,7 @@ const getLocalPackagesDeps = () => {
199
199
  const pdeps = Object.keys(pkgDeps)
200
200
  .reduce((acc, k) => {
201
201
  if (k.indexOf('@eui') !== -1 ) {
202
- if (k.indexOf('@eui/ecl') !== -1) {
202
+ if (k.indexOf('@eui/ecl') !== -1 || k.indexOf('@eui/styles-base') !== -1) {
203
203
  acc[k] = pkgDeps[k];
204
204
  }
205
205
  } else {
@@ -3,7 +3,7 @@
3
3
  // GLOBAL
4
4
  const execa = require('execa');
5
5
  const moment = require('moment');
6
- const axios = require('axios');
6
+ // const axios = require('axios');
7
7
 
8
8
  // LOCAL
9
9
  const tools = require('../../utils/tools');
@@ -135,27 +135,27 @@ const doCall = (options) => {
135
135
  const JIRA_BASE_URL = 'https://webgate.ec.europa.eu/CITnet/jira/rest/api/2/';
136
136
  const { jiraUser, jiraPassword } = tools.getArgs();
137
137
 
138
- axios.defaults.headers.post['Content-Type'] = 'application/json';
139
- axios.defaults.headers.put['Content-Type'] = 'application/json';
138
+ // axios.defaults.headers.post['Content-Type'] = 'application/json';
139
+ // axios.defaults.headers.put['Content-Type'] = 'application/json';
140
140
 
141
141
  return Promise.resolve()
142
142
  .then(() => {
143
- return axios({
144
- baseURL: JIRA_BASE_URL,
145
- url: options.url,
146
- method: options.method,
147
- data: options.data || {},
148
- auth: {
149
- username: jiraUser,
150
- password: jiraPassword
151
- }
152
- })
153
- .then((response) => {
154
- return response;
155
- })
156
- .catch((e) => {
157
- throw e;
158
- });
143
+ // return axios({
144
+ // baseURL: JIRA_BASE_URL,
145
+ // url: options.url,
146
+ // method: options.method,
147
+ // data: options.data || {},
148
+ // auth: {
149
+ // username: jiraUser,
150
+ // password: jiraPassword
151
+ // }
152
+ // })
153
+ // .then((response) => {
154
+ // return response;
155
+ // })
156
+ // .catch((e) => {
157
+ // throw e;
158
+ // });
159
159
  })
160
160
  }
161
161
 
@@ -3,7 +3,7 @@
3
3
  // GLOBAL
4
4
  const path = require('path');
5
5
  const moment = require('moment');
6
- const sanitizeHtml = require('sanitize-html');
6
+ // const sanitizeHtml = require('sanitize-html');
7
7
 
8
8
  // LOCAL
9
9
  const tools = require('../../utils/tools');
@@ -100,7 +100,8 @@ const envsMetadataToTable = (metadata) => {
100
100
 
101
101
  tools.logSuccess();
102
102
 
103
- return sanitizeHtml(content);
103
+ // return sanitizeHtml(content);
104
+ return content;
104
105
  })
105
106
 
106
107
  .catch((e) => {
@@ -3,7 +3,7 @@
3
3
  // GLOBAL
4
4
  const path = require('path');
5
5
  const execa = require('execa');
6
- const sanitizeHtml = require('sanitize-html');
6
+ // const sanitizeHtml = require('sanitize-html');
7
7
  const moment = require('moment');
8
8
  const semver = require('semver');
9
9
 
@@ -395,7 +395,8 @@ const historyMetadataToTable = (metadata) => {
395
395
 
396
396
  tools.logSuccess();
397
397
 
398
- return sanitizeHtml(content);
398
+ // return sanitizeHtml(content);
399
+ return content;
399
400
  }
400
401
 
401
402
 
@@ -3,7 +3,6 @@
3
3
  // GLOBAL
4
4
  const path = require('path');
5
5
  const execa = require('execa');
6
- const sanitizeHtml = require('sanitize-html');
7
6
  const moment = require('moment');
8
7
  const semver = require('semver');
9
8
 
@@ -381,8 +381,6 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
381
381
 
382
382
 
383
383
  module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
384
- console.log(pkgMetadata);
385
-
386
384
  return Promise.resolve()
387
385
  .then(() => {
388
386
  utils.tools.logTitle('ERROR !!!!! an unexpected error occured....');
@@ -13,7 +13,7 @@ const notificationUtils = require('../../notification/notification-utils');
13
13
  let { deps, skipClean, skipLint, skipTest, skipCompile, skipDoc } = tools.getArgs();
14
14
 
15
15
 
16
- const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
16
+ const compileSassFileDartSass = (folder, filename) => {
17
17
  const filePath = path.join(folder, 'styles', filename);
18
18
 
19
19
  tools.logInfo(`Compiling ${filePath}.scss...`);
@@ -22,55 +22,54 @@ const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
22
22
  .then(() => {
23
23
  tools.logInfo('Compiling SCSS...');
24
24
 
25
- if (isNodeSassTildeImporterActive !== false) {
26
- tools.logInfo('building with tilde importer');
27
-
28
- return execa('node-sass', [
29
- filePath + '.scss',
30
- filePath + '.temp.css',
31
- '--importer',
32
- './node_modules/node-sass-tilde-importer',
33
- '--output-style',
34
- 'compressed',
35
- '--source-map',
36
- true,
37
- '--source-map-contents'
38
- ]);
39
-
40
- } else {
41
- tools.logInfo('building without tilde importer');
42
-
43
- return execa('node-sass', [
44
- filePath + '.scss',
45
- filePath + '.temp.css',
46
- '--importer',
47
- '--output-style',
48
- 'compressed',
49
- '--source-map',
50
- true,
51
- '--source-map-contents'
52
- ]);
53
-
54
- }
55
- })
25
+ const sass = require('sass');
56
26
 
57
- .then((output) => {
58
- // console.log(output);
59
- console.log('Size ::: ' + fs.statSync(filePath + '.temp.css').size);
27
+ return sass.renderSync({
28
+ file: filePath + '.scss',
29
+ outFile: filePath + '.temp.css',
30
+ sourceMap: true,
31
+ sourceMapContents: true,
32
+ sourceMapEmbed: true,
33
+ includePaths: [
34
+ path.resolve(process.cwd(), 'node_modules'),
35
+ ],
36
+ });
60
37
  })
61
38
 
62
- .then(() => {
63
- tools.logInfo('Running postCss over generated css file...');
64
-
65
- return execa('postcss', [
66
- filePath + '.temp.css',
67
- '--config',
68
- path.join(__dirname, 'postcss.config.js'),
69
- '--no-map',
70
- '--verbose',
71
- '--output',
72
- filePath + '.css'
73
- ]);
39
+ .then((sassResult) => {
40
+ const finalDest = filePath + '.css';
41
+
42
+ const cssnano = require('cssnano');
43
+ const autoprefixer = require('autoprefixer');
44
+ const postcss = require('postcss');
45
+
46
+ const plugins = [];
47
+
48
+ plugins.push(autoprefixer({
49
+ grid: 'no-autoplace',
50
+ // browsers: [
51
+ // "> 0.5% in alt-eu",
52
+ // "last 2 version",
53
+ // "not dead",
54
+ // "not op_mini all"
55
+ // ]
56
+ }));
57
+ plugins.push(cssnano({ safe: true }));
58
+
59
+ return postcss(plugins)
60
+ .process(sassResult.css, {
61
+ map: { inline: false, prev: sassResult.map.toString() },
62
+ from: filePath + '.scss',
63
+ to: finalDest,
64
+ })
65
+ .then((postcssResult) => {
66
+ // fs.mkdirSync(path.dirname(dest), { recursive: true });
67
+ fs.writeFileSync(finalDest, postcssResult.css);
68
+
69
+ if (postcssResult.map) {
70
+ fs.writeFileSync(`${finalDest}.map`, postcssResult.map);
71
+ }
72
+ });
74
73
  })
75
74
 
76
75
  .then((output) => {
@@ -84,6 +83,7 @@ const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
84
83
  tools.remove(filePath + '.temp.css');
85
84
  tools.remove(filePath + '.temp.css.map');
86
85
  })
86
+
87
87
  .catch((e) => {
88
88
  console.log(e);
89
89
  throw e;
@@ -91,6 +91,99 @@ const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
91
91
  }
92
92
 
93
93
 
94
+ // const compileSassFileNodeSass = (folder, filename, isNodeSassTildeImporterActive) => {
95
+ // const filePath = path.join(folder, 'styles', filename);
96
+
97
+ // tools.logInfo(`Compiling ${filePath}.scss...`);
98
+
99
+ // return Promise.resolve()
100
+ // .then(() => {
101
+ // tools.logInfo('Compiling SCSS...');
102
+
103
+ // if (isNodeSassTildeImporterActive !== false) {
104
+ // tools.logInfo('building with tilde importer');
105
+
106
+ // return execa('node-sass', [
107
+ // filePath + '.scss',
108
+ // filePath + '.temp.css',
109
+ // '--importer',
110
+ // './node_modules/node-sass-tilde-importer',
111
+ // '--output-style',
112
+ // 'compressed',
113
+ // '--source-map',
114
+ // true,
115
+ // '--source-map-contents'
116
+ // ]);
117
+
118
+ // } else {
119
+ // tools.logInfo('building without tilde importer');
120
+
121
+ // return execa('node-sass', [
122
+ // filePath + '.scss',
123
+ // filePath + '.temp.css',
124
+ // '--importer',
125
+ // '--output-style',
126
+ // 'compressed',
127
+ // '--source-map',
128
+ // true,
129
+ // '--source-map-contents'
130
+ // ]);
131
+
132
+ // }
133
+ // })
134
+
135
+ // .then((output) => {
136
+ // // console.log(output);
137
+ // console.log('Size ::: ' + fs.statSync(filePath + '.temp.css').size);
138
+ // })
139
+
140
+ // .then(() => {
141
+ // tools.logInfo('Running postCss over generated css file...');
142
+
143
+ // return execa('postcss', [
144
+ // filePath + '.temp.css',
145
+ // '--config',
146
+ // path.join(__dirname, 'postcss.config.js'),
147
+ // '--no-map',
148
+ // '--verbose',
149
+ // '--output',
150
+ // filePath + '.css'
151
+ // ]);
152
+ // })
153
+
154
+ // .then((output) => {
155
+ // // console.log(output);
156
+ // console.log('Size ::: ' + fs.statSync(filePath + '.css').size);
157
+ // })
158
+
159
+ // .then(() => {
160
+ // tools.logSuccess(`OK ==> generated ${filePath}.css`);
161
+ // tools.remove(filePath + '.temp.css');
162
+ // tools.remove(filePath + '.temp.css.map');
163
+ // })
164
+ // .catch((e) => {
165
+ // console.log(e);
166
+ // throw e;
167
+ // })
168
+ // }
169
+
170
+
171
+ const compileSassFile = (pkg, folder, filename, isNodeSassTildeImporterActive) => {
172
+ return Promise.resolve()
173
+ .then(() => {
174
+ // if (pkg.build && pkg.build.dartSass) {
175
+ return compileSassFileDartSass(folder, filename);
176
+ // } else {
177
+ // return compileSassFileNodeSass(folder, filename, isNodeSassTildeImporterActive);
178
+ // }
179
+ })
180
+
181
+ .catch((e) => {
182
+ console.log(e);
183
+ throw e;
184
+ })
185
+ }
186
+
94
187
 
95
188
 
96
189
  module.exports.build = (pkg) => {
@@ -125,7 +218,7 @@ module.exports.build = (pkg) => {
125
218
  .then(() => Promise.resolve().then(() => {
126
219
  return pkg.stylesheets.reduce((promise, file) => {
127
220
  return promise.then(() => (
128
- compileSassFile(tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
221
+ compileSassFile(pkg, tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
129
222
  )).catch((e) => {
130
223
  console.log(e);
131
224
  throw e;
@@ -12,7 +12,7 @@ import { TranslateModule } from '@ngx-translate/core';
12
12
  import {
13
13
  CoreModule, CoreModuleEffects, translateConfig, EUI_CONFIG_TOKEN,
14
14
  } from '@eui/core';
15
- import { EuiAllModule } from '@eui/components-next';
15
+ import { EuiAllModule } from '@eui/components';
16
16
 
17
17
  import { appConfig } from '../config/index';
18
18
  import { environment } from '../environments/environment';
@@ -3,7 +3,8 @@
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "types": [],
6
- "target": "ES2015",
6
+ "module": "ESNext",
7
+ "target": "ES2016",
7
8
  "lib": ["es2020", "dom"]
8
9
  },
9
10
  "exclude": [
@@ -139,6 +139,7 @@ module.exports.injectAppConfig = (project, configEnvTarget, build) => {
139
139
  // if (build) {
140
140
  // rootTargetFolder = 'dist';
141
141
  // }
142
+
142
143
  tools.logInfo(`Replacing default ${rootTargetFolder}/assets/openid-login-config.json file by ${envFilePath} content`);
143
144
  tools.copy(envFilePath, path.join(project.paths.angularPath, `${rootTargetFolder}/assets/openid-login-config.json`));
144
145