@eui/tools 6.2.27 → 6.2.29

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
- 6.2.27
1
+ 6.2.29
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.2.29 (2022-11-15)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * remote serve package.json location update - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([1ca1799f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1ca1799f6bab99321f49f32f5307c346c352307e))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.2.28 (2022-11-15)
11
+
12
+ ##### Chores
13
+
14
+ * **v15-remote:**
15
+ * adds locale registration for v15 remote skeleton - EUI-8998 [EUI-8998](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-8998) ([e63397f3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e63397f38416ec82b4d3673049ac3e2db5fab1ba))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.2.27 (2022-11-15)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.27",
3
+ "version": "6.2.29",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -0,0 +1,53 @@
1
+ import { GlobalConfig, I18nConfig, LocaleServiceConfig } from '@eui/core';
2
+
3
+ /**
4
+ * import and register locales (currently MWP uses only French and english)
5
+ */
6
+ import { registerLocaleData } from '@angular/common';
7
+ import localeEn from '@angular/common/locales/en';
8
+ import localeEnExtra from '@angular/common/locales/extra/en';
9
+ import localeFr from '@angular/common/locales/fr';
10
+ import localeFrExtra from '@angular/common/locales/extra/fr';
11
+ registerLocaleData(localeEn, 'en', localeEnExtra);
12
+ registerLocaleData(localeFr, 'fr', localeFrExtra);
13
+
14
+ /**
15
+ * Internationalization Configuration
16
+ */
17
+ const i18nConfig: I18nConfig = {
18
+ i18nLoader: {
19
+ i18nFolders: ['elements/@module.full.name@/bundles/assets/i18n-compiled'],
20
+ i18nResources: [{
21
+ prefix: 'assets/i18n-eui/',
22
+ suffix: '.json',
23
+ }],
24
+ },
25
+ i18nService: {
26
+ languages: ['en', 'fr'],
27
+ defaultLanguage: 'en',
28
+ },
29
+ };
30
+
31
+ /**
32
+ * Locale Configuration
33
+ */
34
+ const localeConfig: LocaleServiceConfig = {
35
+ id: 'en',
36
+ available: ['en', 'fr'],
37
+ bindWithTranslate: true,
38
+ affectGlobalLocale: true,
39
+ };
40
+
41
+ /**
42
+ * Global Configuration
43
+ */
44
+ export const GLOBAL: GlobalConfig = {
45
+ /* URL that needs to be used in the appRouting of the MWP */
46
+ baseUrl: '@module.name@',
47
+ /* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
48
+ elementName: '@module.scope-name@',
49
+ /* in case you are using NgRx give it a unique name (mostly for debugging) */
50
+ storeName: '@module.scope-name@',
51
+ i18n: i18nConfig,
52
+ locale: localeConfig,
53
+ };
@@ -28,7 +28,7 @@ module.exports.serve = (remote = false) => {
28
28
 
29
29
  const ng = path.resolve(pkg.paths.repoNodeModules, '@angular', 'cli', 'bin', 'ng');
30
30
 
31
- let destPath;
31
+ let rootDestPath, destPath;
32
32
 
33
33
  if (!project) {
34
34
  tools.logInfo('Project paramater must be specified...stopping');
@@ -57,15 +57,16 @@ module.exports.serve = (remote = false) => {
57
57
  const projectConfig = configUtils.projects.getProject(project);
58
58
 
59
59
  if (projectConfig.host && projectConfig.virtual) {
60
- destPath = path.join(process.cwd(), 'hosts', project, 'src', 'assets', 'elements', pkgName, 'bundles');
60
+ rootDestPath = path.join(process.cwd(), 'hosts', project, 'src', 'assets', 'elements', pkgName);
61
61
  } else {
62
- destPath = path.join(process.cwd(), 'apps', project, 'src', 'assets', 'elements', pkgName, 'bundles');
62
+ rootDestPath = path.join(process.cwd(), 'apps', project, 'src', 'assets', 'elements', pkgName);
63
63
  }
64
64
 
65
+ destPath = path.join(rootDestPath, 'bundles');
66
+
65
67
  if (euiVersionNumber <= 10) {
66
68
  args.push(`--outputPath=${destPath}`);
67
69
  args.push(`--single-bundle=true`);
68
- // args.push('--watch=true');
69
70
  } else {
70
71
  args.push(`--output-path=${destPath}`);
71
72
  }
@@ -96,7 +97,7 @@ module.exports.serve = (remote = false) => {
96
97
  })
97
98
 
98
99
  .then(() => {
99
- return remotesUtils.copyPackageJson(pkg.paths.root, destPath, remoteEuiVersion);
100
+ return remotesUtils.copyPackageJson(pkg.paths.root, rootDestPath, remoteEuiVersion);
100
101
  })
101
102
 
102
103
  .then(() => {