Skip to content

Commit

Permalink
Merge pull request #21 from Doczilla-APP/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
TriPSs authored Jul 17, 2024
2 parents 58b8c91 + 845abfd commit 29e1c45
Show file tree
Hide file tree
Showing 4 changed files with 1,092 additions and 145 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ yarn add @doczilla/node
## Usage

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

```ts
import Doczilla from '@doczilla/node';
import Doczilla from '@doczilla/node'

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

const pdfBuffer = await doczilla.pdf.direct({
url: 'https://doczilla.app'
page: {
html: '<div>Your first Doczilla PDF</div>'
}
})
```

Expand Down
31 changes: 23 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,23 @@
"email": "[email protected]",
"url": "https://doczilla.app"
},
"sideEffects": false,
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/types/index.d.ts"
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"build": "yarn clean && yarn build:ts && yarn build:types",
"build:ts": "tsup src/index.ts --format cjs,esm --clean",
"build:types": "tsc --emitDeclarationOnly --outDir dist/types",
"clean": "rm -rf dist",
"generate:sdk": "node ./generate-models.js && yarn build",
"lint": "eslint --ext .ts .",
"test": "jest"
Expand All @@ -38,18 +51,20 @@
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@swc/core": "^1.6.13",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.13",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"axios-mock-adapter": "^1.22.0",
"eslint": "9.3.0",
"eslint": "9.7.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"jest": "^29.7.0",
"openapi-typescript-codegen": "^0.29.0",
"ts-jest": "^29.1.4",
"typescript": "^5.4"
"ts-jest": "^29.2.2",
"tsup": "^8.1.1",
"typescript": "^5.5"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
7 changes: 0 additions & 7 deletions tsconfig.esm.json

This file was deleted.

Loading

0 comments on commit 29e1c45

Please sign in to comment.