Skip to content

Commit 29e1c45

Browse files
authored
Merge pull request #21 from Doczilla-APP/improvements
Improvements
2 parents 58b8c91 + 845abfd commit 29e1c45

File tree

4 files changed

+1092
-145
lines changed

4 files changed

+1092
-145
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ yarn add @doczilla/node
1313
## Usage
1414

1515
The package needs to be configured with your account's API key, which is
16-
available your [Doczilla's organisation settings page](https://doczilla.app/login).
16+
available on your [Doczilla's organisation settings page](https://doczilla.app/login).
1717

1818
```ts
19-
import Doczilla from '@doczilla/node';
19+
import Doczilla from '@doczilla/node'
2020

2121
const doczilla = new Doczilla('doczilla-...')
2222

2323
const pdfBuffer = await doczilla.pdf.direct({
24-
url: 'https://doczilla.app'
24+
page: {
25+
html: '<div>Your first Doczilla PDF</div>'
26+
}
2527
})
2628
```
2729

package.json

+23-8
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,23 @@
2525
"email": "[email protected]",
2626
"url": "https://doczilla.app"
2727
},
28+
"sideEffects": false,
29+
"exports": {
30+
".": {
31+
"require": "./dist/index.js",
32+
"import": "./dist/index.mjs",
33+
"types": "./dist/types/index.d.ts"
34+
},
35+
"./package.json": "./package.json"
36+
},
2837
"main": "./dist/index.js",
2938
"module": "./dist/esm/index.js",
39+
"types": "./dist/types/index.d.ts",
3040
"scripts": {
31-
"build": "tsc && tsc -p tsconfig.esm.json",
41+
"build": "yarn clean && yarn build:ts && yarn build:types",
42+
"build:ts": "tsup src/index.ts --format cjs,esm --clean",
43+
"build:types": "tsc --emitDeclarationOnly --outDir dist/types",
44+
"clean": "rm -rf dist",
3245
"generate:sdk": "node ./generate-models.js && yarn build",
3346
"lint": "eslint --ext .ts .",
3447
"test": "jest"
@@ -38,18 +51,20 @@
3851
},
3952
"devDependencies": {
4053
"@jest/globals": "^29.7.0",
54+
"@swc/core": "^1.6.13",
4155
"@types/jest": "^29.5.12",
42-
"@types/node": "^20.12.13",
43-
"@typescript-eslint/eslint-plugin": "^7.11.0",
44-
"@typescript-eslint/parser": "^7.11.0",
56+
"@types/node": "^20.14.10",
57+
"@typescript-eslint/eslint-plugin": "^7.16.1",
58+
"@typescript-eslint/parser": "^7.16.1",
4559
"axios-mock-adapter": "^1.22.0",
46-
"eslint": "9.3.0",
60+
"eslint": "9.7.0",
4761
"eslint-plugin-import": "2.29.1",
48-
"eslint-plugin-simple-import-sort": "^12.1.0",
62+
"eslint-plugin-simple-import-sort": "^12.1.1",
4963
"jest": "^29.7.0",
5064
"openapi-typescript-codegen": "^0.29.0",
51-
"ts-jest": "^29.1.4",
52-
"typescript": "^5.4"
65+
"ts-jest": "^29.2.2",
66+
"tsup": "^8.1.1",
67+
"typescript": "^5.5"
5368
},
5469
"packageManager": "[email protected]",
5570
"engines": {

tsconfig.esm.json

-7
This file was deleted.

0 commit comments

Comments
 (0)