Skip to content

Commit 593f10b

Browse files
chore: skip sample build for cdn (#4460)
https://coveord.atlassian.net/browse/KIT-3602 Copy what was in the angular sample and other sample relying on Atomic, for the same reason (but expanded to all the sample now that Bueno is an external of Headless). Will be revisited in post-ga tech debts
1 parent 116689f commit 593f10b

File tree

9 files changed

+19
-9
lines changed

9 files changed

+19
-9
lines changed

Diff for: packages/samples/atomic-react/project.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"outputs": ["{projectRoot}/public/dist"],
1010
"executor": "nx:run-commands",
1111
"options": {
12-
"commands": ["tsc --noEmit", "tsc --module es2022 --noEmit"],
12+
"commands": [
13+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then tsc --noEmit; fi",
14+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then tsc --module es2022 --noEmit; fi"
15+
],
1316
"parallel": true,
1417
"cwd": "packages/samples/atomic-react"
1518
}

Diff for: packages/samples/headless-commerce-react/project.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"cached:build": {
66
"executor": "nx:run-commands",
77
"options": {
8-
"commands": ["npm run build:client"],
8+
"commands": [
9+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:client; fi"
10+
],
911
"parallel": true,
1012
"cwd": "packages/samples/headless-commerce-react"
1113
}

Diff for: packages/samples/headless-react/project.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"cached:build": {
66
"executor": "nx:run-commands",
77
"options": {
8-
"commands": ["npm run build:client"],
8+
"commands": [
9+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:client; fi"
10+
],
911
"parallel": true,
1012
"cwd": "packages/samples/headless-react"
1113
}

Diff for: packages/samples/headless-ssr-commerce/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cached:build": {
66
"executor": "nx:run-commands",
77
"options": {
8-
"command": "npm run build:next",
8+
"command": "if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:next; fi",
99
"cwd": "packages/samples/headless-ssr-commerce"
1010
}
1111
},

Diff for: packages/samples/headless-ssr/app-router/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cached:build": {
66
"executor": "nx:run-commands",
77
"options": {
8-
"command": "npm run build:next",
8+
"command": "if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:next; fi",
99
"cwd": "packages/samples/headless-ssr/app-router"
1010
}
1111
},

Diff for: packages/samples/headless-ssr/pages-router/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cached:build": {
66
"executor": "nx:run-commands",
77
"options": {
8-
"command": "npm run build:next",
8+
"command": "if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:next; fi",
99
"cwd": "packages/samples/headless-ssr/pages-router"
1010
}
1111
},

Diff for: packages/samples/iife/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"outputs": ["{projectRoot}/www/cdn"],
1111
"executor": "nx:run-commands",
1212
"options": {
13-
"command": "npm run build:assets",
13+
"command": "if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:assets; fi",
1414
"cwd": "packages/samples/iife"
1515
}
1616
},

Diff for: packages/samples/stencil/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"outputs": ["{projectRoot}/www", "{projectRoot}/src/components.d.ts"],
1515
"executor": "nx:run-commands",
1616
"options": {
17-
"command": "node --max_old_space_size=6144 ../../../node_modules/@stencil/core/bin/stencil build",
17+
"command": "if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then node --max_old_space_size=6144 ../../../node_modules/@stencil/core/bin/stencil build; fi",
1818
"cwd": "packages/samples/stencil"
1919
}
2020
},

Diff for: packages/samples/vuejs/project.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
"dependsOn": ["^build", "clean"],
77
"executor": "nx:run-commands",
88
"options": {
9-
"commands": ["npm run build:assets", "npm run build:vue"],
9+
"commands": [
10+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:assets; fi",
11+
"if [ \"$DEPLOYMENT_ENVIRONMENT\" != \"CDN\" ]; then npm run build:vue; fi"
12+
],
1013
"parallel": false,
1114
"cwd": "packages/samples/vuejs"
1215
}

0 commit comments

Comments
 (0)