Skip to content

Commit cf7d531

Browse files
committed
Use karma-ui5-transpile to get TS transpiled
1 parent 765dd00 commit cf7d531

File tree

5 files changed

+43
-5
lines changed

5 files changed

+43
-5
lines changed

app/travel_analytics/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = async (config) => {
1616

1717
config.set({
1818
frameworks: ["ui5"],
19+
preprocessors: {
20+
"webapp/**/*.ts": ["ui5-transpile"],
21+
},
1922
logLevel: "INFO", // log errors only. Change to "DEBUG" for more verbosity
2023
proxies: {
2124
"/base/webapp/": "/",

app/travel_analytics/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"test:node": "karma start --server=node --single-run",
1616
"ts-typecheck": "tsc --noEmit",
1717
"prestart": "npm run ts-typecheck",
18-
"prebuild": "npm run ts-typecheck"
18+
"prebuild": "npm run ts-typecheck",
19+
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf"
1920
},
2021
"keywords": [
2122
"ui5",
@@ -36,8 +37,5 @@
3637
"@typescript-eslint/eslint-plugin": "^7.1.1",
3738
"@typescript-eslint/parser": "^7.1.1",
3839
"@sap-ux/eslint-plugin-fiori-tools": "^0.4.0"
39-
},
40-
"scripts": {
41-
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf"
4240
}
4341
}

app/travel_processor/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = async (config) => {
1616

1717
config.set({
1818
frameworks: ["ui5"],
19+
preprocessors: {
20+
"webapp/**/*.ts": ["ui5-transpile"],
21+
},
1922
logLevel: "INFO", // log errors only. Change to "DEBUG" for more verbosity
2023
proxies: {
2124
"/base/webapp/": "/",

package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"eslint": "^9",
3838
"http-proxy": "^1.18.1",
3939
"jest": "^29.0.2",
40+
"karma-ui5-transpile": "^3.5.1",
4041
"qunit": "^2.9.3",
4142
"ts-jest": "^29.2.5",
4243
"tsx": "^4.19.2",
@@ -152,4 +153,4 @@
152153
"imports": {
153154
"#cds-models/*": "./@cds-models/*/index.js"
154155
}
155-
}
156+
}

0 commit comments

Comments
 (0)