@ecomplus/storefront-framework 5.16.29 → 5.17.2
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/.bundles.json +2 -2
- package/.ecom.json +1 -1
- package/CHANGELOG.md +39 -0
- package/functions/package-lock.json +261 -220
- package/functions/package.json +4 -4
- package/package.json +9 -9
- package/src/bin/scripts/build.js +24 -8
package/functions/package.json
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
},
|
|
14
14
|
"main": "index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ecomplus/storefront-renderer": "^2.8.
|
|
17
|
-
"firebase-admin": "^9.
|
|
18
|
-
"firebase-functions": "^3.15.
|
|
16
|
+
"@ecomplus/storefront-renderer": "^2.8.2",
|
|
17
|
+
"firebase-admin": "^9.12.0",
|
|
18
|
+
"firebase-functions": "^3.15.7"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"firebase-functions-test": "^0.3.
|
|
21
|
+
"firebase-functions-test": "^0.3.2"
|
|
22
22
|
},
|
|
23
23
|
"private": true
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomplus/storefront-framework",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.2",
|
|
4
4
|
"description": "Framework for PWA and JAMstack e-commerce templates with E-Com Plus APIs",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/ecomplus/storefront/tree/master/@ecomplus/storefront-framework#readme",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@babel/core": "^7.15.
|
|
39
|
+
"@babel/core": "^7.15.5",
|
|
40
40
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
41
|
-
"@babel/preset-env": "^7.15.
|
|
42
|
-
"@ecomplus/storefront-renderer": "^2.8.
|
|
41
|
+
"@babel/preset-env": "^7.15.6",
|
|
42
|
+
"@ecomplus/storefront-renderer": "^2.8.2",
|
|
43
43
|
"@ecomplus/storefront-router": "^2.2.1",
|
|
44
|
-
"autoprefixer": "^9.8.
|
|
44
|
+
"autoprefixer": "^9.8.7",
|
|
45
45
|
"babel-loader": "^8.2.2",
|
|
46
|
-
"clean-webpack-plugin": "^
|
|
46
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
47
47
|
"copy-webpack-plugin": "^6.4.1",
|
|
48
|
-
"core-js": ">=3.16.0 <3.
|
|
48
|
+
"core-js": ">=3.16.0 <3.19",
|
|
49
49
|
"css-loader": "^3.6.0",
|
|
50
50
|
"cssnano": "^4.1.11",
|
|
51
51
|
"ejs": "^3.1.6",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"mini-css-extract-plugin": "^0.12.0",
|
|
55
55
|
"mkdirp": "^1.0.4",
|
|
56
56
|
"node-sass": "^6.0.1",
|
|
57
|
-
"postcss": "^7.0.
|
|
57
|
+
"postcss": "^7.0.38",
|
|
58
58
|
"postcss-loader": "^4.3.0",
|
|
59
59
|
"raw-loader": "^4.0.2",
|
|
60
60
|
"recursive-readdir": "^2.2.2",
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"webpack-dev-middleware": "^3.7.3",
|
|
69
69
|
"webpack-merge": "^4.2.2",
|
|
70
70
|
"webpack-pwa-manifest": "^4.3.0",
|
|
71
|
-
"workbox-webpack-plugin": "^6.
|
|
71
|
+
"workbox-webpack-plugin": "^6.3.0"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/bin/scripts/build.js
CHANGED
|
@@ -214,17 +214,33 @@ bundler.then(async ({ assetsByChunkName }) => {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
const { domain } = settings
|
|
218
|
+
if (domain) {
|
|
219
|
+
if (!routes.find(({ path }) => path === '/sitemap.xml')) {
|
|
220
|
+
// generate Sitemap
|
|
221
|
+
const sitemapSrc = path.join(__dirname, '../../assets/sitemap.xml.ejs')
|
|
222
|
+
ejs.renderFile(sitemapSrc, { domain, routes }, (err, xml) => {
|
|
223
|
+
if (err) {
|
|
224
|
+
console.error(err)
|
|
225
|
+
} else {
|
|
226
|
+
// save default sitemap.xml on output dir
|
|
227
|
+
fs.writeFileSync(path.join(paths.output, 'sitemap.xml'), xml)
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// check robots.txt
|
|
233
|
+
fs.readFile(path.join(paths.output, 'robots.txt'), 'utf8', (err, txt) => {
|
|
221
234
|
if (err) {
|
|
222
|
-
console.
|
|
223
|
-
} else {
|
|
224
|
-
//
|
|
225
|
-
|
|
235
|
+
console.log('WARN: You should have a /template/public/admin/robots.txt file')
|
|
236
|
+
} else if (txt.indexOf('Sitemap:') === -1) {
|
|
237
|
+
// add sitemap to static robots.txt
|
|
238
|
+
txt += `\nSitemap: https://${domain}/sitemap.xml`
|
|
239
|
+
fs.writeFileSync(path.join(paths.output, 'robots.txt'), txt)
|
|
226
240
|
}
|
|
227
241
|
})
|
|
242
|
+
} else {
|
|
243
|
+
console.log('WARN: You should set domain on settings for SEO purposes')
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
// cache bundler result
|