@griddo/cx 1.59.8 → 1.60.0
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.
- package/gatsby-browser.js +3 -3
- package/gatsby-config.js +0 -1
- package/package.json +4 -4
- package/src/utils/sites.js +0 -2
- package/scripts/replace-absolute-urls.js +0 -13
package/gatsby-browser.js
CHANGED
|
@@ -20,10 +20,10 @@ export const onRouteUpdate = ({ location }) => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
function getOffset(el) {
|
|
23
|
-
const rect = document
|
|
23
|
+
const rect = document?.querySelector(el)?.getBoundingClientRect();
|
|
24
24
|
|
|
25
25
|
return {
|
|
26
|
-
left: rect
|
|
27
|
-
top: rect
|
|
26
|
+
left: rect?.left + window?.scrollX,
|
|
27
|
+
top: rect?.top + window?.scrollY,
|
|
28
28
|
};
|
|
29
29
|
}
|
package/gatsby-config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.60.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"gatsby": "^3.0.0",
|
|
49
49
|
"gatsby-plugin-canonical-urls": "2.1.6",
|
|
50
50
|
"gatsby-plugin-catch-links": "^3.0.0",
|
|
51
|
-
"gatsby-plugin-force-trailing-slashes": "^1.0.
|
|
51
|
+
"gatsby-plugin-force-trailing-slashes": "^1.0.5",
|
|
52
52
|
"gatsby-plugin-no-sourcemaps": "^3.0.0",
|
|
53
53
|
"gatsby-plugin-polyfill-io": "1.1.0",
|
|
54
54
|
"gatsby-plugin-react-helmet": "^4.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"react-helmet": "^6.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@griddo/eslint-config-back": "^1.
|
|
69
|
+
"@griddo/eslint-config-back": "^1.60.0",
|
|
70
70
|
"eslint": "^7.5.0",
|
|
71
71
|
"eslint-plugin-node": "^11.1.0",
|
|
72
72
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"access": "public"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "6fef1378f392f0463b32f3ad06de2c6e7708f484"
|
|
102
102
|
}
|
package/src/utils/sites.js
CHANGED
|
@@ -150,10 +150,8 @@ const generateSitemaps = async sites => {
|
|
|
150
150
|
helpers.log('info', `sitemap file exact path ${exactPath}`);
|
|
151
151
|
await saveFile(exactPath, siteMap);
|
|
152
152
|
sitemaps.push(`${home.endsWith('/') ? home.slice(0, -1) : home}${sitemapName}`);
|
|
153
|
-
console.log('sitemap file\n', { home, sitemapName, url: `${home.endsWith('/') ? home.slice(0, -1) : home}${sitemapName}` });
|
|
154
153
|
}
|
|
155
154
|
if (!sitemaps.length) continue;
|
|
156
|
-
console.log('Sitemap index\n', sitemaps);
|
|
157
155
|
const siteMap = js2xmlparser.parse('sitemapindex', {
|
|
158
156
|
'@': {
|
|
159
157
|
xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9',
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const { join } = require('path')
|
|
2
|
-
const { exec } = require("child_process");
|
|
3
|
-
|
|
4
|
-
const CX_ABSOLUTE_PATH = '//cx.dev.griddo.io'
|
|
5
|
-
const CX_LOCAL_PATH = '//localhost:5555'
|
|
6
|
-
const PUBLIC_DIR = join(`${__dirname}`, '../public')
|
|
7
|
-
|
|
8
|
-
exec(
|
|
9
|
-
`grep -RiIl ${CX_ABSOLUTE_PATH} ${PUBLIC_DIR} | xargs sed -i "" -e "s+${CX_ABSOLUTE_PATH}+${CX_LOCAL_PATH}+g"`,
|
|
10
|
-
(err) => {
|
|
11
|
-
if (err) console.error(err);
|
|
12
|
-
}
|
|
13
|
-
);
|