Skip to content

Commit db7f897

Browse files
committed
feat: add tests, update README, set up GitHub Actions, and fix code
1 parent 22cbf59 commit db7f897

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.releaserc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{
1111
"@semantic-release/npm": {
1212
"npmPublish": true,
13-
"pkgRoot": "dist"
13+
"pkgRoot": "dist",
14+
"version": "1.2.1"
1415
}
1516
}
1617
]

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ cd axios-error-handler
148148
npm install
149149
```
150150

151+
### Running Tests
152+
153+
The project uses Jest for testing. To run the tests, use the following command:
154+
155+
```bash
156+
npm test
157+
```
158+
151159
### Building
152160

153161
To compile the TypeScript code into JavaScript, run:
@@ -156,7 +164,7 @@ To compile the TypeScript code into JavaScript, run:
156164
npm run build
157165
```
158166

159-
This will generate the compiled code in the `dist` directory.
167+
This will generate the compiled code in the `dist` directory. The compiled files are then published to npm instead of the TypeScript source files.
160168

161169
## License
162170

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "axios-error-handler-ts",
33
"version": "1.2.1",
44
"description": "A simple helper to handle errors in Axios requests with customizable messages.",
5-
"main": "src/errorHandler.ts",
6-
"types": "src/errorHandler.ts",
5+
"main": "dist/errorHandler.js",
6+
"types": "dist/errorHandler.d.ts",
77
"repository": {
88
"type": "git",
99
"url": "git+https://github.com/Jszigeti/axios-error-handler.git"
@@ -42,5 +42,10 @@
4242
"bugs": {
4343
"url": "https://github.com/Jszigeti/axios-error-handler/issues"
4444
},
45-
"homepage": "https://github.com/Jszigeti/axios-error-handler#readme"
45+
"homepage": "https://github.com/Jszigeti/axios-error-handler#readme",
46+
"files": [
47+
"dist/**/*",
48+
"README.md",
49+
"LICENSE"
50+
]
4651
}

0 commit comments

Comments
 (0)