@griddo/cx 11.9.17 → 11.10.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/README.md +13 -240
- package/build/commands/end-render.d.ts +0 -1
- package/build/commands/end-render.js +31 -0
- package/build/commands/end-render.js.map +7 -0
- package/build/commands/prepare-assets-directory.js +9 -0
- package/build/commands/prepare-assets-directory.js.map +7 -0
- package/build/commands/prepare-domains-render.js +40 -0
- package/build/commands/prepare-domains-render.js.map +7 -0
- package/build/commands/reset-render.d.ts +0 -1
- package/build/commands/reset-render.js +31 -0
- package/build/commands/reset-render.js.map +7 -0
- package/build/commands/single-domain-upload-search-content.d.ts +1 -0
- package/build/commands/start-render.d.ts +0 -1
- package/build/commands/start-render.js +66 -0
- package/build/commands/start-render.js.map +7 -0
- package/build/commands/upload-search-content.d.ts +0 -1
- package/build/commands/upload-search-content.js +32 -0
- package/build/commands/upload-search-content.js.map +7 -0
- package/build/core/GriddoLog.d.ts +16 -0
- package/build/{utils/health-checks.d.ts → core/check-env-health.d.ts} +4 -2
- package/build/core/db-class.d.ts +11 -0
- package/build/core/db.d.ts +4 -0
- package/build/core/dist-rollback.d.ts +11 -0
- package/build/core/errors.d.ts +26 -0
- package/build/core/fs.d.ts +69 -0
- package/build/core/life-cycle.d.ts +26 -0
- package/build/core/logger.d.ts +18 -0
- package/build/core/objects.d.ts +11 -0
- package/build/core/print-logos.d.ts +5 -0
- package/build/index.d.ts +10 -29
- package/build/index.js +404 -73
- package/build/react/DynamicScript/index.d.ts +4 -0
- package/build/react/GriddoFavicon/index.d.ts +4 -0
- package/build/react/GriddoIntegrations/index.d.ts +3 -4
- package/build/react/GriddoIntegrations/utils.d.ts +7 -6
- package/build/react/GriddoOpenGraph/index.d.ts +10 -0
- package/build/react/index.d.ts +3 -2
- package/build/react/index.js +1 -3
- package/build/{utils → services}/api.d.ts +1 -1
- package/build/services/auth.d.ts +2 -5
- package/build/services/domains.d.ts +3 -4
- package/build/services/manage-sites.d.ts +22 -0
- package/build/services/manage-store.d.ts +32 -0
- package/build/services/navigation.d.ts +16 -16
- package/build/{utils → services}/pages.d.ts +3 -3
- package/build/services/reference-fields.d.ts +3 -3
- package/build/services/render-artifacts.d.ts +6 -0
- package/build/services/render.d.ts +70 -0
- package/build/services/robots.d.ts +2 -19
- package/build/services/sitemaps.d.ts +5 -0
- package/build/services/sites.d.ts +8 -5
- package/build/services/store.d.ts +10 -1
- package/build/shared/context.d.ts +36 -0
- package/build/shared/envs.d.ts +17 -0
- package/build/{errors/errors-data.d.ts → shared/errors.d.ts} +5 -3
- package/build/shared/npm-modules/brush.d.ts +18 -0
- package/build/shared/npm-modules/find-up-simple.d.ts +34 -0
- package/build/shared/npm-modules/pkg-dir.d.ts +7 -0
- package/build/shared/npm-modules/xml-parser.d.ts +4 -0
- package/build/{types → shared/types}/api.d.ts +18 -18
- package/build/{types → shared/types}/global.d.ts +15 -16
- package/build/{types → shared/types}/navigation.d.ts +5 -5
- package/build/{types → shared/types}/pages.d.ts +9 -9
- package/build/shared/types/render.d.ts +56 -0
- package/build/{types → shared/types}/sites.d.ts +18 -19
- package/build/shared/types.d.ts +15 -0
- package/build/ssg-adapters/gatsby/actions/clean.d.ts +3 -0
- package/build/ssg-adapters/gatsby/actions/close.d.ts +3 -0
- package/build/ssg-adapters/gatsby/actions/data.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/healthCheck.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/init.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/logs.d.ts +3 -0
- package/build/ssg-adapters/gatsby/actions/meta.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/prepare.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/relocation.d.ts +2 -0
- package/build/ssg-adapters/gatsby/actions/restore.d.ts +3 -0
- package/build/ssg-adapters/gatsby/actions/ssg.d.ts +3 -0
- package/build/ssg-adapters/gatsby/actions/sync.d.ts +3 -0
- package/build/ssg-adapters/gatsby/index.d.ts +9 -0
- package/build/ssg-adapters/gatsby/shared/artifacts.d.ts +4 -0
- package/build/ssg-adapters/gatsby/shared/diff-assets.d.ts +15 -0
- package/build/ssg-adapters/gatsby/shared/extract-assets.d.ts +7 -0
- package/build/ssg-adapters/gatsby/shared/gatsby-build.d.ts +7 -0
- package/build/ssg-adapters/gatsby/shared/render-rollback.d.ts +18 -0
- package/build/ssg-adapters/gatsby/shared/sync-render.d.ts +26 -0
- package/build/ssg-adapters/gatsby/shared/types.d.ts +34 -0
- package/cli.mjs +231 -0
- package/exporter/build-esbuild.noop +42 -0
- package/exporter/build.sh +16 -24
- package/exporter/commands/README.md +142 -0
- package/exporter/commands/end-render.ts +53 -87
- package/exporter/commands/prepare-assets-directory.ts +35 -0
- package/exporter/commands/prepare-domains-render.ts +150 -33
- package/exporter/commands/reset-render.ts +13 -8
- package/exporter/commands/single-domain-upload-search-content.ts +206 -0
- package/exporter/commands/start-render.ts +14 -65
- package/exporter/commands/upload-search-content.ts +204 -26
- package/exporter/core/GriddoLog.ts +45 -0
- package/exporter/core/check-env-health.ts +203 -0
- package/exporter/core/db-class.ts +54 -0
- package/exporter/core/db.ts +33 -0
- package/exporter/core/dist-rollback.ts +49 -0
- package/exporter/core/errors.ts +93 -0
- package/exporter/core/fs.ts +385 -0
- package/exporter/{utils → core}/images.ts +1 -6
- package/exporter/{utils → core}/instance.ts +9 -13
- package/exporter/core/life-cycle.ts +73 -0
- package/exporter/core/logger.ts +137 -0
- package/exporter/core/objects.ts +37 -0
- package/exporter/core/print-logos.ts +21 -0
- package/exporter/index.ts +14 -56
- package/exporter/react/DynamicScript/index.tsx +33 -0
- package/exporter/react/{Favicon → GriddoFavicon}/index.tsx +3 -9
- package/exporter/react/GriddoIntegrations/index.tsx +17 -23
- package/exporter/react/GriddoIntegrations/utils.ts +24 -12
- package/exporter/react/GriddoOpenGraph/index.tsx +39 -0
- package/exporter/react/index.tsx +3 -9
- package/exporter/services/api.ts +306 -0
- package/exporter/services/auth.ts +8 -10
- package/exporter/services/domains.ts +23 -8
- package/exporter/services/manage-sites.ts +116 -0
- package/exporter/services/manage-store.ts +173 -0
- package/exporter/services/navigation.ts +12 -18
- package/exporter/{utils → services}/pages.ts +27 -92
- package/exporter/services/reference-fields.ts +14 -32
- package/exporter/services/render-artifacts.ts +44 -0
- package/exporter/services/render.ts +229 -0
- package/exporter/services/robots.ts +33 -61
- package/exporter/services/sitemaps.ts +129 -0
- package/exporter/services/sites.ts +40 -28
- package/exporter/services/store.ts +354 -321
- package/exporter/shared/context.ts +49 -0
- package/exporter/{constants → shared}/endpoints.ts +12 -11
- package/exporter/shared/envs.ts +58 -0
- package/exporter/{errors/errors-data.ts → shared/errors.ts} +24 -14
- package/exporter/shared/npm-modules/README.md +36 -0
- package/exporter/shared/npm-modules/brush.ts +34 -0
- package/exporter/shared/npm-modules/find-up-simple.ts +100 -0
- package/exporter/shared/npm-modules/pkg-dir.ts +17 -0
- package/exporter/shared/npm-modules/xml-parser.ts +57 -0
- package/exporter/{types → shared/types}/api.ts +40 -41
- package/exporter/{types → shared/types}/global.ts +17 -21
- package/exporter/{types → shared/types}/navigation.ts +3 -3
- package/exporter/{types → shared/types}/pages.ts +10 -11
- package/exporter/shared/types/render.ts +65 -0
- package/exporter/{types → shared/types}/sites.ts +18 -19
- package/exporter/shared/types.ts +15 -0
- package/exporter/ssg-adapters/gatsby/actions/clean.ts +26 -0
- package/exporter/ssg-adapters/gatsby/actions/close.ts +17 -0
- package/exporter/ssg-adapters/gatsby/actions/data.ts +22 -0
- package/exporter/ssg-adapters/gatsby/actions/healthCheck.ts +10 -0
- package/exporter/ssg-adapters/gatsby/actions/init.ts +12 -0
- package/exporter/ssg-adapters/gatsby/actions/logs.ts +10 -0
- package/exporter/ssg-adapters/gatsby/actions/meta.ts +13 -0
- package/exporter/ssg-adapters/gatsby/actions/prepare.ts +9 -0
- package/exporter/ssg-adapters/gatsby/actions/relocation.ts +15 -0
- package/exporter/ssg-adapters/gatsby/actions/restore.ts +21 -0
- package/exporter/ssg-adapters/gatsby/actions/ssg.ts +12 -0
- package/exporter/ssg-adapters/gatsby/actions/sync.ts +65 -0
- package/exporter/ssg-adapters/gatsby/index.ts +117 -0
- package/exporter/ssg-adapters/gatsby/shared/artifacts.ts +17 -0
- package/exporter/ssg-adapters/gatsby/shared/diff-assets.ts +128 -0
- package/exporter/ssg-adapters/gatsby/shared/extract-assets.ts +75 -0
- package/exporter/ssg-adapters/gatsby/shared/gatsby-build.ts +58 -0
- package/exporter/ssg-adapters/gatsby/shared/render-rollback.ts +33 -0
- package/exporter/ssg-adapters/gatsby/shared/sync-render.ts +298 -0
- package/exporter/ssg-adapters/gatsby/shared/types.ts +35 -0
- package/gatsby-browser.tsx +41 -58
- package/gatsby-config.ts +10 -17
- package/gatsby-node.ts +20 -79
- package/gatsby-ssr.tsx +2 -1
- package/package.json +41 -78
- package/plugins/gatsby-plugin-svgr-loader/gatsby-node.js +55 -0
- package/plugins/gatsby-plugin-svgr-loader/package.json +8 -0
- package/src/components/Head.tsx +28 -73
- package/src/components/template.tsx +6 -29
- package/src/gatsby-node-utils.ts +81 -2
- package/src/html.tsx +2 -11
- package/src/types.ts +3 -3
- package/tsconfig.commands.json +36 -0
- package/tsconfig.exporter.json +21 -0
- package/tsconfig.json +5 -3
- package/build/adapters/gatsby/index.d.ts +0 -4
- package/build/adapters/gatsby/utils.d.ts +0 -26
- package/build/artifacts/index.d.ts +0 -6
- package/build/constants/envs.d.ts +0 -37
- package/build/constants/index.d.ts +0 -57
- package/build/end-render.js +0 -74
- package/build/end-render.js.map +0 -7
- package/build/errors/index.d.ts +0 -15
- package/build/index.js.map +0 -7
- package/build/prepare-domains-render.js +0 -73
- package/build/prepare-domains-render.js.map +0 -7
- package/build/react/Favicon/index.d.ts +0 -5
- package/build/registers/api.d.ts +0 -9
- package/build/registers/gatsby.d.ts +0 -9
- package/build/registers/index.d.ts +0 -3
- package/build/reset-render.js +0 -74
- package/build/reset-render.js.map +0 -7
- package/build/services/register.d.ts +0 -36
- package/build/services/settings.d.ts +0 -4
- package/build/start-render.js +0 -100
- package/build/start-render.js.map +0 -7
- package/build/upload-search-content.js +0 -74
- package/build/upload-search-content.js.map +0 -7
- package/build/utils/alerts.d.ts +0 -3
- package/build/utils/cache.d.ts +0 -35
- package/build/utils/core-utils.d.ts +0 -107
- package/build/utils/create-build-data.d.ts +0 -8
- package/build/utils/domains.d.ts +0 -13
- package/build/utils/folders.d.ts +0 -53
- package/build/utils/loggin.d.ts +0 -51
- package/build/utils/render.d.ts +0 -13
- package/build/utils/searches.d.ts +0 -15
- package/build/utils/sites.d.ts +0 -31
- package/build/utils/store.d.ts +0 -81
- package/cx.config.d.ts +0 -5
- package/cx.config.js +0 -36
- package/exporter/adapters/gatsby/index.ts +0 -182
- package/exporter/adapters/gatsby/utils.ts +0 -186
- package/exporter/artifacts/README.md +0 -34
- package/exporter/artifacts/index.ts +0 -33
- package/exporter/commands/move-assets.ts +0 -11
- package/exporter/constants/envs.ts +0 -94
- package/exporter/constants/index.ts +0 -129
- package/exporter/errors/index.ts +0 -40
- package/exporter/registers/api.ts +0 -14
- package/exporter/registers/gatsby.ts +0 -14
- package/exporter/registers/index.ts +0 -4
- package/exporter/services/register.ts +0 -113
- package/exporter/services/settings.ts +0 -17
- package/exporter/utils/alerts.ts +0 -29
- package/exporter/utils/api.ts +0 -243
- package/exporter/utils/cache.ts +0 -142
- package/exporter/utils/core-utils.ts +0 -458
- package/exporter/utils/create-build-data.ts +0 -17
- package/exporter/utils/domains.ts +0 -39
- package/exporter/utils/folders.ts +0 -320
- package/exporter/utils/health-checks.ts +0 -64
- package/exporter/utils/loggin.ts +0 -184
- package/exporter/utils/render.ts +0 -71
- package/exporter/utils/searches.ts +0 -156
- package/exporter/utils/sites.ts +0 -312
- package/exporter/utils/store.ts +0 -314
- package/src/README.md +0 -7
- package/start-render.js +0 -7
- /package/build/commands/{move-assets.d.ts → prepare-assets-directory.d.ts} +0 -0
- /package/build/{utils → core}/images.d.ts +0 -0
- /package/build/{utils → core}/instance.d.ts +0 -0
- /package/build/react/{Favicon → GriddoFavicon}/utils.d.ts +0 -0
- /package/build/{constants → shared}/endpoints.d.ts +0 -0
- /package/build/{types → shared/types}/templates.d.ts +0 -0
- /package/exporter/react/{Favicon → GriddoFavicon}/utils.ts +0 -0
- /package/exporter/{types → shared/types}/templates.ts +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.10.0",
|
|
5
5
|
"authors": [
|
|
6
|
-
"
|
|
7
|
-
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
8
|
-
"Francis Vega <francis.vega@secuoyas.com>",
|
|
9
|
-
"Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
|
|
10
|
-
"Sergio Ródenas <sergio.rodenas@secuoyas.com>"
|
|
6
|
+
"Hisco <francis.vega@griddo.io>"
|
|
11
7
|
],
|
|
12
8
|
"license": "UNLICENSED",
|
|
13
9
|
"homepage": "https://griddo.io",
|
|
@@ -16,8 +12,7 @@
|
|
|
16
12
|
"url": "https://github.com/griddo/griddo"
|
|
17
13
|
},
|
|
18
14
|
"bin": {
|
|
19
|
-
"griddo-
|
|
20
|
-
"griddo-start-render": "./start-render.js"
|
|
15
|
+
"griddo-render": "cli.mjs"
|
|
21
16
|
},
|
|
22
17
|
"exports": {
|
|
23
18
|
".": {
|
|
@@ -35,100 +30,68 @@
|
|
|
35
30
|
"// NPM": "",
|
|
36
31
|
"prepare": "yarn run build",
|
|
37
32
|
"// BUILD": "",
|
|
38
|
-
"build": "sh ./exporter/build.sh",
|
|
39
|
-
"build:debug": "sh ./exporter/build.sh --debug",
|
|
33
|
+
"build": "rm -rf build && sh ./exporter/build.sh",
|
|
34
|
+
"build:debug": "rm -rf build && sh ./exporter/build.sh --debug",
|
|
40
35
|
"// TESTS": "",
|
|
41
|
-
"test": "
|
|
42
|
-
"test
|
|
43
|
-
"test:
|
|
36
|
+
"test": "npm run test:compile && npm run test:create-render-fixtures && node --env-file=.env --test ./build/__tests__/* && npm run test:remove-render-fixtures",
|
|
37
|
+
"test-exporter": "npm run test:compile && node --env-file=.env --test ./build/__tests__exporter__/",
|
|
38
|
+
"test:create-render-fixtures": "node --env-file=.env ./build/__tests__/utils/create-fixtures",
|
|
39
|
+
"test:remove-render-fixtures": "node --env-file=.env ./build/__tests__/utils/remove-fixtures",
|
|
40
|
+
"test:compile": "tsgo --project tsconfig.tests.json",
|
|
44
41
|
"// INFRA SCRIPTS": "",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"end-render": "node ./build/end-render
|
|
48
|
-
"
|
|
49
|
-
"reset-render": "node ./build/reset-render
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"// LINTER": "",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"run:format": "prettier --write ."
|
|
42
|
+
"prepare-domains-render": "node ./build/commands/prepare-domains-render",
|
|
43
|
+
"start-render": "node ./build/commands/start-render",
|
|
44
|
+
"end-render": "node ./build/commands/end-render",
|
|
45
|
+
"upload-search-content": "node ./build/commands/upload-search-content",
|
|
46
|
+
"reset-render": "node ./build/commands/reset-render",
|
|
47
|
+
"// ONLY LOCAL SCRIPTS": "",
|
|
48
|
+
"prepare-assets-directory": "node ./build/commands/prepare-assets-directory",
|
|
49
|
+
"create-rollback-copy": "rm -rf ../../exports-backup && cp -r ../../exports ../../exports-backup",
|
|
50
|
+
"render": "npm run build && node --env-file=.env cli.mjs render --root=../..",
|
|
51
|
+
"// LINTER & FORMATTER": "",
|
|
52
|
+
"lint": "biome check --write",
|
|
53
|
+
"format": "biome format --write",
|
|
54
|
+
"flint": "npm run lint && npm run format",
|
|
55
|
+
"ts-lint": "tsgo --noEmit",
|
|
56
|
+
"watch:ts-lint": "tsc --noEmit --watch"
|
|
61
57
|
},
|
|
62
58
|
"dependencies": {
|
|
63
|
-
"
|
|
64
|
-
"@babel/plugin-transform-class-properties": "7.25.9",
|
|
65
|
-
"@babel/preset-env": "7.26.0",
|
|
66
|
-
"@babel/preset-react": "7.26.3",
|
|
67
|
-
"@babel/preset-typescript": "7.26.0",
|
|
68
|
-
"@griddo/core": "11.9.17",
|
|
69
|
-
"@svgr/webpack": "5.5.0",
|
|
70
|
-
"axios": "1.7.9",
|
|
71
|
-
"babel-loader": "9.2.1",
|
|
72
|
-
"babel-plugin-transform-runtime": "6.23.0",
|
|
73
|
-
"babel-polyfill": "6.26.0",
|
|
74
|
-
"dotenv": "16.4.5",
|
|
75
|
-
"esbuild": "0.24.0",
|
|
76
|
-
"find-up": "5.0.0",
|
|
77
|
-
"fs-extra": "11.2.0",
|
|
78
|
-
"gatsby": "5.14.0",
|
|
79
|
-
"gatsby-plugin-svgr-loader": "0.1.0",
|
|
80
|
-
"html-react-parser": "5.2.0",
|
|
81
|
-
"js2xmlparser": "5.0.0",
|
|
82
|
-
"kleur": "4.1.5",
|
|
83
|
-
"p-limit": "3.1.0",
|
|
84
|
-
"path-browserify": "1.0.1",
|
|
85
|
-
"pkg-dir": "5.0.0",
|
|
86
|
-
"typescript": "5.7.2",
|
|
87
|
-
"webpack": "5.76.1"
|
|
59
|
+
"gatsby": "5.15.0"
|
|
88
60
|
},
|
|
89
61
|
"devDependencies": {
|
|
90
|
-
"@
|
|
91
|
-
"@types/
|
|
92
|
-
"@
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"cheerio": "1.0.0",
|
|
98
|
-
"eslint": "^9.0.0",
|
|
99
|
-
"eslint-plugin-import": "2.31.0",
|
|
100
|
-
"eslint-plugin-node": "11.1.0",
|
|
101
|
-
"eslint-plugin-react": "7.37.4",
|
|
102
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
103
|
-
"eslint-plugin-testing-library": "^6.2.0",
|
|
104
|
-
"globals": "^16.0.0",
|
|
105
|
-
"prettier": "3.4.2"
|
|
62
|
+
"@biomejs/biome": "2.3.4",
|
|
63
|
+
"@types/node": "20.19.4",
|
|
64
|
+
"@typescript/native-preview": "latest",
|
|
65
|
+
"cheerio": "1.1.2",
|
|
66
|
+
"esbuild": "0.25.12",
|
|
67
|
+
"p-limit": "7.2.0",
|
|
68
|
+
"typescript": "5.9.3"
|
|
106
69
|
},
|
|
107
70
|
"peerDependencies": {
|
|
108
|
-
"@
|
|
109
|
-
"@types/react-dom": ">=18 <19",
|
|
71
|
+
"@griddo/core": "11.9.16",
|
|
110
72
|
"react": ">=18 <19",
|
|
111
73
|
"react-dom": ">=18 <19"
|
|
112
74
|
},
|
|
113
75
|
"engines": {
|
|
114
|
-
"node": ">=20"
|
|
76
|
+
"node": ">=20.19"
|
|
115
77
|
},
|
|
116
78
|
"files": [
|
|
117
79
|
"build",
|
|
118
80
|
"exporter",
|
|
119
81
|
"src",
|
|
120
|
-
"cx.config.d.ts",
|
|
121
|
-
"cx.config.js",
|
|
122
82
|
"gatsby-browser.tsx",
|
|
123
83
|
"gatsby-config.ts",
|
|
124
84
|
"gatsby-node.ts",
|
|
125
85
|
"gatsby-ssr.tsx",
|
|
126
86
|
"global.d.ts",
|
|
127
|
-
"
|
|
128
|
-
"tsconfig.json"
|
|
87
|
+
"tsconfig.commands.json",
|
|
88
|
+
"tsconfig.exporter.json",
|
|
89
|
+
"tsconfig.json",
|
|
90
|
+
"plugins",
|
|
91
|
+
"cli.mjs"
|
|
129
92
|
],
|
|
130
93
|
"publishConfig": {
|
|
131
94
|
"access": "public"
|
|
132
95
|
},
|
|
133
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "2a4fbf94b7614274ee583bd8049036440de60f0e"
|
|
134
97
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
exports.onCreateWebpackConfig = (
|
|
2
|
+
{ stage, actions, getConfig, rules },
|
|
3
|
+
{ rule: ruleProps = {} },
|
|
4
|
+
) => {
|
|
5
|
+
const { include, exclude, options, ...otherProps } = ruleProps;
|
|
6
|
+
|
|
7
|
+
if (["develop", "develop-html", "build-html", "build-javascript"].includes(stage)) {
|
|
8
|
+
// Add the react-svg-loader rule
|
|
9
|
+
actions.setWebpackConfig({
|
|
10
|
+
module: {
|
|
11
|
+
rules: [
|
|
12
|
+
{
|
|
13
|
+
test: /\.svg$/,
|
|
14
|
+
include,
|
|
15
|
+
exclude,
|
|
16
|
+
...otherProps,
|
|
17
|
+
use: [
|
|
18
|
+
{
|
|
19
|
+
loader: "@svgr/webpack",
|
|
20
|
+
options,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const cfg = getConfig();
|
|
28
|
+
const imgsRule = rules.images();
|
|
29
|
+
|
|
30
|
+
const newUrlLoaderRule =
|
|
31
|
+
include || exclude
|
|
32
|
+
? {
|
|
33
|
+
...imgsRule,
|
|
34
|
+
include: exclude,
|
|
35
|
+
exclude: include,
|
|
36
|
+
}
|
|
37
|
+
: {
|
|
38
|
+
...imgsRule,
|
|
39
|
+
test: new RegExp(imgsRule.test.toString().replace("svg|", "").slice(1, -1)),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
cfg.module.rules = [
|
|
43
|
+
// Remove the base url-loader images rule entirely
|
|
44
|
+
...cfg.module.rules.filter((rule) => {
|
|
45
|
+
if (rule.test) {
|
|
46
|
+
return rule.test.toString() !== imgsRule.test.toString();
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
}),
|
|
50
|
+
// Put it back without SVG loading
|
|
51
|
+
newUrlLoaderRule,
|
|
52
|
+
];
|
|
53
|
+
actions.replaceWebpackConfig(cfg);
|
|
54
|
+
}
|
|
55
|
+
};
|
package/src/components/Head.tsx
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { CustomHeadProps } from "../types";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { GriddoFavicon, GriddoIntegrations, GriddoOpenGraph } from "@griddo/cx/react";
|
|
4
|
+
|
|
5
|
+
function cleanCommaSeparated(str: string) {
|
|
6
|
+
return str
|
|
7
|
+
.split(",")
|
|
8
|
+
.map((item) => item.trim())
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.join(",");
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
/**
|
|
7
14
|
* Gatsby Head API
|
|
@@ -12,13 +19,7 @@ const Head = (props: CustomHeadProps) => {
|
|
|
12
19
|
pageContext: {
|
|
13
20
|
locale,
|
|
14
21
|
openGraph,
|
|
15
|
-
page: {
|
|
16
|
-
disableHrefLangs,
|
|
17
|
-
fullUrl,
|
|
18
|
-
defaultLang,
|
|
19
|
-
integrations = [],
|
|
20
|
-
dimensions,
|
|
21
|
-
},
|
|
22
|
+
page: { disableHrefLangs, fullUrl, defaultLang, integrations = [], dimensions },
|
|
22
23
|
pageMetadata,
|
|
23
24
|
siteMetadata,
|
|
24
25
|
siteOptions,
|
|
@@ -31,19 +32,13 @@ const Head = (props: CustomHeadProps) => {
|
|
|
31
32
|
);
|
|
32
33
|
|
|
33
34
|
const showMetaRobots =
|
|
34
|
-
!!metaRobots &&
|
|
35
|
-
(siteOptions?.showBasicMetaRobots || metaRobots !== "index,follow");
|
|
35
|
+
!!metaRobots && (siteOptions?.showBasicMetaRobots || metaRobots !== "index,follow");
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
const cleanPageLanguages =
|
|
39
|
-
pageMetadata?.pageLanguages?.filter((item) => item.isLive) || [];
|
|
37
|
+
const cleanPageLanguages = pageMetadata?.pageLanguages?.filter((item) => item.isLive) || [];
|
|
40
38
|
|
|
41
39
|
const useCanonical =
|
|
42
40
|
!!pageMetadata?.canonical &&
|
|
43
|
-
!(
|
|
44
|
-
siteOptions?.avoidSelfReferenceCanonicals &&
|
|
45
|
-
pageMetadata?.canonical === fullUrl
|
|
46
|
-
);
|
|
41
|
+
!(siteOptions?.avoidSelfReferenceCanonicals && pageMetadata?.canonical === fullUrl);
|
|
47
42
|
|
|
48
43
|
const useHrefLangs =
|
|
49
44
|
!(
|
|
@@ -60,8 +55,7 @@ const Head = (props: CustomHeadProps) => {
|
|
|
60
55
|
(useHrefLangs &&
|
|
61
56
|
!siteOptions?.avoidHrefLangXDefault &&
|
|
62
57
|
defaultLangId &&
|
|
63
|
-
cleanPageLanguages.find((item) => item.languageId === defaultLangId)
|
|
64
|
-
?.url) ||
|
|
58
|
+
cleanPageLanguages.find((item) => item.languageId === defaultLangId)?.url) ||
|
|
65
59
|
null;
|
|
66
60
|
|
|
67
61
|
return (
|
|
@@ -72,15 +66,12 @@ const Head = (props: CustomHeadProps) => {
|
|
|
72
66
|
{!!pageMetadata?.description && (
|
|
73
67
|
<meta name="description" content={pageMetadata?.description} />
|
|
74
68
|
)}
|
|
75
|
-
{siteOptions?.useMetaTitle &&
|
|
76
|
-
<meta name="title" content={pageMetadata?.title} />
|
|
77
|
-
)}
|
|
69
|
+
{siteOptions?.useMetaTitle && <meta name="title" content={pageMetadata?.title} />}
|
|
78
70
|
{useCanonical && <link rel="canonical" href={pageMetadata?.canonical} />}
|
|
79
71
|
|
|
80
|
-
{
|
|
81
|
-
<Favicon url={siteMetadata?.favicon} />
|
|
72
|
+
<GriddoFavicon url={siteMetadata?.favicon} />
|
|
82
73
|
|
|
83
|
-
{/* Alternate,
|
|
74
|
+
{/* Alternate, only if the page is indexed and has translations */}
|
|
84
75
|
{hrefLangXDefaultUrl && (
|
|
85
76
|
<link rel="alternate" href={hrefLangXDefaultUrl} hrefLang="x-default" />
|
|
86
77
|
)}
|
|
@@ -97,51 +88,23 @@ const Head = (props: CustomHeadProps) => {
|
|
|
97
88
|
{/* Robots */}
|
|
98
89
|
{showMetaRobots && <meta name="robots" content={metaRobots} />}
|
|
99
90
|
|
|
100
|
-
{/*
|
|
101
|
-
{
|
|
102
|
-
<meta property="og:site_name" content={siteMetadata?.title} />
|
|
103
|
-
)}
|
|
104
|
-
{!!locale && <meta property="og:locale" content={locale} />}
|
|
105
|
-
{(!!openGraph?.title || !!pageMetadata?.title) && (
|
|
106
|
-
<meta
|
|
107
|
-
property="og:title"
|
|
108
|
-
content={openGraph?.title || pageMetadata?.title}
|
|
109
|
-
/>
|
|
110
|
-
)}
|
|
111
|
-
<meta property="og:type" content={openGraph?.type || "website"} />
|
|
112
|
-
{(!!openGraph?.description || !!pageMetadata?.description) && (
|
|
113
|
-
<meta
|
|
114
|
-
property="og:description"
|
|
115
|
-
content={openGraph?.description || pageMetadata?.description}
|
|
116
|
-
/>
|
|
117
|
-
)}
|
|
118
|
-
{!!openGraph?.image && (
|
|
119
|
-
<meta property="og:image" content={openGraph?.image} />
|
|
120
|
-
)}
|
|
121
|
-
<meta
|
|
122
|
-
property="og:url"
|
|
123
|
-
content={pageMetadata?.canonical || fullUrl || ""}
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
{/* Twitter */}
|
|
127
|
-
<meta property="twitter:card" content="summary_large_image" />
|
|
128
|
-
{!!openGraph?.twitterImage && (
|
|
129
|
-
<meta property="twitter:image" content={openGraph?.twitterImage} />
|
|
130
|
-
)}
|
|
131
|
-
|
|
132
|
-
{/* Debug */}
|
|
133
|
-
{/* {!siteOptions?.avoidDebugMetas && (
|
|
134
|
-
<meta
|
|
135
|
-
property="debug"
|
|
136
|
-
content={`Griddo v${griddoVersion} @ ${renderDate}}`}
|
|
137
|
-
/>
|
|
138
|
-
)} */}
|
|
91
|
+
{/* Griddo Metadatos */}
|
|
92
|
+
{<meta name="griddo-render-date" content={new Date().toISOString()} />}
|
|
139
93
|
|
|
140
94
|
{/* Keywords */}
|
|
141
95
|
{siteOptions?.useMetaKeywords && !!pageMetadata?.metaKeywords && (
|
|
142
96
|
<meta name="keywords" content={pageMetadata.metaKeywords} />
|
|
143
97
|
)}
|
|
144
98
|
|
|
99
|
+
{/* Open Graph */}
|
|
100
|
+
<GriddoOpenGraph
|
|
101
|
+
openGraph={openGraph}
|
|
102
|
+
pageMetadata={pageMetadata}
|
|
103
|
+
siteMetadata={siteMetadata}
|
|
104
|
+
locale={locale}
|
|
105
|
+
fullUrl={fullUrl}
|
|
106
|
+
/>
|
|
107
|
+
|
|
145
108
|
{/* Integrations */}
|
|
146
109
|
<GriddoIntegrations
|
|
147
110
|
id={fullUrl}
|
|
@@ -155,12 +118,4 @@ const Head = (props: CustomHeadProps) => {
|
|
|
155
118
|
);
|
|
156
119
|
};
|
|
157
120
|
|
|
158
|
-
function cleanCommaSeparated(str: string) {
|
|
159
|
-
return str
|
|
160
|
-
.split(",")
|
|
161
|
-
.map((item) => item.trim())
|
|
162
|
-
.filter(Boolean)
|
|
163
|
-
.join(",");
|
|
164
|
-
}
|
|
165
|
-
|
|
166
121
|
export { Head };
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
import type { TemplateProps } from "../types";
|
|
2
1
|
import type { Core } from "@griddo/core";
|
|
2
|
+
import type { TemplateProps } from "../types";
|
|
3
3
|
|
|
4
4
|
import { Page as RenderGriddoPage } from "@griddo/core";
|
|
5
5
|
import { GriddoIntegrations } from "@griddo/cx/react";
|
|
6
|
-
import {
|
|
7
|
-
components,
|
|
8
|
-
SiteProvider,
|
|
9
|
-
templates,
|
|
10
|
-
formsTemplates,
|
|
11
|
-
} from "@griddo-instance";
|
|
6
|
+
import { components, formsTemplates, SiteProvider, templates } from "@griddo-instance";
|
|
12
7
|
import { Link, navigate } from "gatsby";
|
|
13
|
-
import * as React from "react";
|
|
14
8
|
|
|
15
|
-
// Gatsby Head
|
|
16
9
|
export { Head } from "./Head";
|
|
17
10
|
|
|
18
11
|
const Template = (data: TemplateProps) => {
|
|
19
12
|
const {
|
|
20
|
-
pageContext: {
|
|
21
|
-
cloudinaryName,
|
|
22
|
-
page,
|
|
23
|
-
siteLangs,
|
|
24
|
-
siteMetadata,
|
|
25
|
-
socials,
|
|
26
|
-
theme,
|
|
27
|
-
},
|
|
13
|
+
pageContext: { cloudinaryName, page, siteLangs, siteMetadata, socials, theme },
|
|
28
14
|
} = data;
|
|
29
15
|
|
|
30
16
|
const library = {
|
|
@@ -33,8 +19,6 @@ const Template = (data: TemplateProps) => {
|
|
|
33
19
|
formsTemplates,
|
|
34
20
|
};
|
|
35
21
|
|
|
36
|
-
const mappedTheme = theme || "default-theme";
|
|
37
|
-
|
|
38
22
|
const header = data.pageContext.header as Core.HeaderModule;
|
|
39
23
|
const footer = data.pageContext.footer as Core.FooterModule;
|
|
40
24
|
|
|
@@ -52,14 +36,10 @@ const Template = (data: TemplateProps) => {
|
|
|
52
36
|
siteLangs={siteLangs}
|
|
53
37
|
siteMetadata={siteMetadata}
|
|
54
38
|
socials={socials}
|
|
55
|
-
theme={
|
|
39
|
+
theme={theme}
|
|
56
40
|
>
|
|
57
|
-
<GriddoIntegrations
|
|
58
|
-
location="start-body"
|
|
59
|
-
integrations={page.integrations}
|
|
60
|
-
/>
|
|
41
|
+
<GriddoIntegrations location="start-body" integrations={page.integrations} />
|
|
61
42
|
|
|
62
|
-
{/* Render every page */}
|
|
63
43
|
<RenderGriddoPage
|
|
64
44
|
apiUrl={page.apiUrl}
|
|
65
45
|
content={page}
|
|
@@ -70,10 +50,7 @@ const Template = (data: TemplateProps) => {
|
|
|
70
50
|
pageLanguages={page.pageLanguages}
|
|
71
51
|
/>
|
|
72
52
|
|
|
73
|
-
<GriddoIntegrations
|
|
74
|
-
location="end-body"
|
|
75
|
-
integrations={page.integrations}
|
|
76
|
-
/>
|
|
53
|
+
<GriddoIntegrations location="end-body" integrations={page.integrations} />
|
|
77
54
|
</SiteProvider>
|
|
78
55
|
);
|
|
79
56
|
};
|
package/src/gatsby-node-utils.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import type { GriddoPageObject } from "@griddo/cx";
|
|
1
2
|
import type { GatsbyNode } from "gatsby";
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
+
import fsp from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
componentLibraryPathAlias,
|
|
9
|
+
getRenderPathsHydratedWithDomainFromDB,
|
|
10
|
+
isComponentLibrary,
|
|
11
|
+
ReadFromStoreError,
|
|
12
|
+
throwError,
|
|
13
|
+
walkStore,
|
|
14
|
+
} from "@griddo/cx";
|
|
15
|
+
|
|
16
|
+
import { pathExists } from "../exporter/core/fs";
|
|
4
17
|
|
|
5
18
|
const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
|
|
6
19
|
actions,
|
|
@@ -40,7 +53,73 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
|
|
|
40
53
|
// No sourcemaps on builds
|
|
41
54
|
if (stage === "build-javascript") {
|
|
42
55
|
actions.setWebpackConfig({ devtool: false });
|
|
56
|
+
|
|
57
|
+
// TODO: Hablar con infra para no invalidar cache de los assets
|
|
58
|
+
// const newWebpackConfig = {
|
|
59
|
+
// ...getConfig(),
|
|
60
|
+
// output: {
|
|
61
|
+
// filename: `[name].js`, // no contenthash
|
|
62
|
+
// chunkFilename: `[name].js`, // no contenthash
|
|
63
|
+
// path: getConfig().output.path,
|
|
64
|
+
// publicPath: getConfig().output.publicPath,
|
|
65
|
+
// },
|
|
66
|
+
// };
|
|
67
|
+
|
|
68
|
+
// actions.replaceWebpackConfig(newWebpackConfig);
|
|
43
69
|
}
|
|
44
70
|
};
|
|
45
71
|
|
|
46
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Return a scale size colors with a number and a measure string (KB by default).
|
|
74
|
+
*
|
|
75
|
+
* @param size The page size in KB.
|
|
76
|
+
* @param measure The measure string to be added in the log.
|
|
77
|
+
*/
|
|
78
|
+
function pageSizeLog(size: number, measure = "KB") {
|
|
79
|
+
return `${size}${measure}`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Read all pages stored in the `store` Griddo directory and returns one by one
|
|
84
|
+
* with a generator.
|
|
85
|
+
*
|
|
86
|
+
* @param basePath - Base directory to get pages from.
|
|
87
|
+
* @param options.withSizeProp - Add size prop to the page object.
|
|
88
|
+
* @todo throw error if the basePath is not an store folder
|
|
89
|
+
*/
|
|
90
|
+
async function* getBuildPagesFromStore<PageType extends GriddoPageObject>(args?: {
|
|
91
|
+
basePath?: string;
|
|
92
|
+
withSizeProp?: boolean;
|
|
93
|
+
dbFilePath?: string;
|
|
94
|
+
}): AsyncGenerator<PageType> {
|
|
95
|
+
const { basePath, withSizeProp, dbFilePath } = args || {};
|
|
96
|
+
const { __root } = await getRenderPathsHydratedWithDomainFromDB({
|
|
97
|
+
dbFilePath,
|
|
98
|
+
});
|
|
99
|
+
const pagesDirPath = basePath || path.join(__root, "store");
|
|
100
|
+
|
|
101
|
+
if (!pathExists(pagesDirPath)) {
|
|
102
|
+
throwError(ReadFromStoreError, `Pages directory not found: ${pagesDirPath}`);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
for await (const filePath of walkStore(pagesDirPath)) {
|
|
107
|
+
const fileContent = await fsp.readFile(filePath, "utf-8");
|
|
108
|
+
const page = JSON.parse(fileContent) as PageType;
|
|
109
|
+
|
|
110
|
+
if (withSizeProp) {
|
|
111
|
+
const fileStats = await fsp.stat(filePath);
|
|
112
|
+
page.size = fileStats.size / 1024;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// SECURITY: Only returns valid page objects
|
|
116
|
+
if (page.path) {
|
|
117
|
+
yield page;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} catch (error) {
|
|
121
|
+
throwError(ReadFromStoreError, error);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { getBuildPagesFromStore, onCreateWebpackConfig, pageSizeLog };
|
package/src/html.tsx
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import type { HtmlProps } from "./types";
|
|
2
2
|
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
3
|
function HTML(props: HtmlProps) {
|
|
6
4
|
return (
|
|
7
5
|
<html {...props.htmlAttributes}>
|
|
8
6
|
<head>
|
|
9
7
|
<meta charSet="utf-8" />
|
|
10
8
|
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
|
|
11
|
-
<meta
|
|
12
|
-
name="viewport"
|
|
13
|
-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
|
14
|
-
/>
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
15
10
|
{props.headComponents}
|
|
16
11
|
</head>
|
|
17
12
|
<body {...props.bodyAttributes}>
|
|
18
13
|
{props.preBodyComponents}
|
|
19
|
-
<div
|
|
20
|
-
key={"body"}
|
|
21
|
-
id="___gatsby"
|
|
22
|
-
dangerouslySetInnerHTML={{ __html: props.body }}
|
|
23
|
-
/>
|
|
14
|
+
<div key={"body"} id="___gatsby" dangerouslySetInnerHTML={{ __html: props.body }} />
|
|
24
15
|
<div id="modal" />
|
|
25
16
|
{props.postBodyComponents}
|
|
26
17
|
</body>
|
package/src/types.ts
CHANGED
|
@@ -16,7 +16,7 @@ interface CustomHeadProps extends HeadProps {
|
|
|
16
16
|
page: Core.Page & {
|
|
17
17
|
defaultLang: { id: number };
|
|
18
18
|
dimensions: Dimensions;
|
|
19
|
-
disableHrefLangs:
|
|
19
|
+
disableHrefLangs: number[];
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -81,7 +81,7 @@ type GatsbyPageObject = {
|
|
|
81
81
|
siteMetadata: Site["siteMetadata"];
|
|
82
82
|
theme: string;
|
|
83
83
|
title: string;
|
|
84
|
-
siteLangs:
|
|
84
|
+
siteLangs: Core.SiteLanguage[];
|
|
85
85
|
siteOptions: AdditionalInfo["siteOptions"];
|
|
86
86
|
siteScript: string;
|
|
87
87
|
socials: SocialsResponse;
|
|
@@ -89,4 +89,4 @@ type GatsbyPageObject = {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
export { CustomHeadProps, GatsbyPageObject, HtmlProps, TemplateProps };
|
|
92
|
+
export type { CustomHeadProps, GatsbyPageObject, HtmlProps, TemplateProps };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Opciones del Proyecto */
|
|
4
|
+
"target": "es2022", // Genera JavaScript compatible con versiones modernas de Node.js
|
|
5
|
+
"module": "commonjs", // El formato de módulo que usará Node.js para ejecutar los scripts
|
|
6
|
+
"outDir": "./build", // Directorio de salida para los archivos .js compilados
|
|
7
|
+
"rootDir": "./exporter", // Directorio raíz de los fuentes, para mantener la estructura en 'outDir'
|
|
8
|
+
|
|
9
|
+
/* Módulos */
|
|
10
|
+
"moduleResolution": "node", // Cómo se resuelven los módulos (estándar para Node)
|
|
11
|
+
"esModuleInterop": true, // Permite una mejor interoperabilidad entre CommonJS y ES Modules
|
|
12
|
+
|
|
13
|
+
// AÑADIDO: Permitir la importación de archivos .json como módulos.
|
|
14
|
+
// Esto soluciona el error con `import ... from "../../package.json"`.
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
|
|
17
|
+
/* Opciones de Emisión */
|
|
18
|
+
"sourceMap": true, // Genera sourcemaps para facilitar el debugging
|
|
19
|
+
|
|
20
|
+
/* Chequeo de Tipos Estricto */
|
|
21
|
+
"strict": true, // Habilita todas las opciones de chequeo de tipos estrictas
|
|
22
|
+
"skipLibCheck": true, // Evita el chequeo de tipos en los archivos de declaración (.d.ts) de las dependencias
|
|
23
|
+
|
|
24
|
+
/* Opciones Adicionales */
|
|
25
|
+
"forceConsistentCasingInFileNames": true, // Asegura que las mayúsculas y minúsculas en los nombres de archivo sean consistentes
|
|
26
|
+
"types": ["node"]
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"exporter/**/*.ts", // Incluye todos los archivos .ts dentro de la carpeta exporter
|
|
30
|
+
"exporter/**/*.tsx"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"node_modules", // Excluye las dependencias
|
|
34
|
+
"**/*.test.ts" // Excluye los archivos de test
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022",
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"outDir": "./build",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"inlineSourceMap": false,
|
|
16
|
+
"types": ["node"],
|
|
17
|
+
"rootDir": "./exporter"
|
|
18
|
+
},
|
|
19
|
+
"include": ["./exporter/**/*.ts", "./exporter/**/*.tsx", "global.d.ts"],
|
|
20
|
+
"exclude": ["./src/**/*"]
|
|
21
|
+
}
|