Skip to content

Commit 85949eb

Browse files
committed
fix: build step paths
1 parent 720605a commit 85949eb

File tree

4 files changed

+167
-8
lines changed

4 files changed

+167
-8
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With this library you can just give the css selector of the Ionic Element, or th
2222

2323
## Install
2424

25-
`npm install @saninn/cypress-ionic`.
25+
`npm install @saninn/cypress-ionic --save-dev`.
2626

2727
Then enable ShadowDom access on your Cypress Project:
2828

@@ -68,9 +68,10 @@ You can see the served host on `http://localhost:3999` with:
6868
- [html/index.html](/html/index.html) is the file with the supported components.
6969
- [html/assets/scripts.mjs](/html/assets/scripts.mjs) contains the Ionic initialization calls and some event listeners needed for testing.
7070

71-
### Guidelines
71+
##TODO.
7272

73-
TODO.
73+
- Dev Guidelines
74+
- More components
7475

7576
## Pull requests are welcome
7677

package-lock.json

Lines changed: 148 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.3-0",
44
"description": "A set of functions to help you interact with Ionic Framework elements in your Cypress tests",
55
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
78
"files": [
89
"dist"
@@ -11,14 +12,14 @@
1112
"access": "public"
1213
},
1314
"scripts": {
14-
"prepare": "husky install",
15+
"prepare": "husky install && ts-patch install -s",
1516
"serve": "node ./scripts/serve.mjs",
1617
"develop": "start-server-and-test serve http://localhost:3999 test-open",
1718
"test-open": "cypress open",
1819
"test": "cypress run",
1920
"full-test": "start-server-and-test serve http://localhost:3999 test",
2021
"ci": "node --experimental-json-modules ./scripts/test.mjs",
21-
"build": "npx tsc -p .",
22+
"build": "tsc --project tsconfig.json",
2223
"tsc:check": "tsc --noEmit",
2324
"prettier:check": "prettier --config ./.prettierrc ./src --check",
2425
"release": "release-it --verbose --ci",
@@ -65,8 +66,10 @@
6566
"pretty-quick": "^3.1.2",
6667
"release-it": "^14.11.8",
6768
"start-server-and-test": "^1.14.0",
69+
"ts-patch": "^2.0.1",
6870
"tslib": "^2.3.1",
69-
"typescript": "^4.5.2"
71+
"typescript": "^4.5.2",
72+
"typescript-transform-paths": "^3.3.1"
7073
},
7174
"peerDependencies": {
7275
"@ionic/core": ">= 5.0.0",

tsconfig.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@
1717
"@interfaces": ["./src/interfaces/index.ts"],
1818
"@helpers": ["./src/helpers/index.ts"]
1919
},
20-
"types": ["cypress", "node", "@testing-library/cypress"]
20+
"types": ["cypress", "node", "@testing-library/cypress"],
21+
// Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries
22+
"plugins": [
23+
// Transform paths in output .js files
24+
{ "transform": "typescript-transform-paths" },
25+
26+
// Transform paths in output .d.ts files (Include this line if you output declarations files)
27+
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
28+
]
2129
},
2230
"include": ["./src"]
2331
}

0 commit comments

Comments
 (0)