@eui/tools 6.12.13 → 6.12.14

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.12.13
1
+ 6.12.14
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.12.14 (2023-06-23)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add piwik injection in index.html of remote if set in config - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([e2e07b03](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e2e07b031966d3ef64b24d54160a56637620425d))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.12.13 (2023-06-23)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.13",
3
+ "version": "6.12.14",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -131,7 +131,7 @@ module.exports.postBuild = (pkg, version) => {
131
131
  })
132
132
 
133
133
  .then(() => {
134
- return remotesUtils.emptyIndexHtml(path.join(pkg.paths.dist, 'bundles'));
134
+ return remotesUtils.emptyIndexHtml(path.join(pkg, pkg.paths.dist, 'bundles'));
135
135
  })
136
136
 
137
137
  .then(() => {
@@ -66,15 +66,24 @@ module.exports.copyPackageJson = (srcPath, destPath, euiVersion) => {
66
66
  }
67
67
 
68
68
 
69
- module.exports.emptyIndexHtml = (destPath) => {
69
+ module.exports.emptyIndexHtml = (pkg, destPath) => {
70
70
  return Promise.resolve()
71
71
  .then(() => {
72
72
  try {
73
- tools.logInfo('Set empty index.html');
73
+ if (pkg.build.injectPiwikScript) {
74
+ tools.logInfo('Inject index.html with piwik script embedded');
74
75
 
75
- const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index.html');
76
- const outputIndexHmtlFile = path.join(destPath, 'index.html');
77
- return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
76
+ const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index-piwik.html');
77
+ const outputIndexHmtlFile = path.join(destPath, 'index.html');
78
+ return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
79
+
80
+ } else {
81
+ tools.logInfo('Set empty index.html');
82
+
83
+ const emptyIndexHtmlFile = path.join(__dirname, 'skeletons', 'elements', 'index.html');
84
+ const outputIndexHmtlFile = path.join(destPath, 'index.html');
85
+ return tools.copy(emptyIndexHtmlFile, outputIndexHmtlFile);
86
+ }
78
87
 
79
88
  } catch(e) {
80
89
  console.log(e);
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base href="/">
6
+ <script defer src="https://europa.eu/webtools/load.js" type="text/javascript"></script>
7
+ <!--Used for analytics-->
8
+ <script type="application/json">
9
+ {
10
+ "utility": "piwik",
11
+ "siteID": 237,
12
+ "instance": "ec.europa.eu",
13
+ "sitePath": ["ec.europa.eu\/info"],
14
+ "siteSection": "info classFundingTenders opportunities",
15
+ "mode": "manual"
16
+ }
17
+ </script>
18
+ </head>
19
+ <body>
20
+ </body>
21
+ </html>
@@ -106,7 +106,7 @@ module.exports.serve = (remote = false) => {
106
106
  })
107
107
 
108
108
  .then(() => {
109
- return remotesUtils.emptyIndexHtml(destPath);
109
+ return remotesUtils.emptyIndexHtml(pkg, destPath);
110
110
  })
111
111
 
112
112
  .catch((e) => {