@shad0wz7/nestjs-pdf 2.4.3 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/index.cjs +3840 -0
- package/dist/index.d.cts +407 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +376 -362
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3736 -5142
- package/dist/index.mjs.map +1 -0
- package/package.json +116 -86
- package/dist/index.d.ts +0 -393
- package/dist/index.js +0 -5184
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# nestjs-pdf
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/%40shad0wz7%2Fnestjs-pdf)
|
|
4
|
+
[](https://github.com/ShadowZ11/nestjs-pdf?tab=MIT-1-ov-file)
|
|
4
5
|
[](https://www.npmjs.com/package/%40shad0wz7%2Fnestjs-pdf)
|
|
5
6
|
[](https://github.com/Shadowz11/nestjs-pdf/actions/workflows/ci.yml)
|
|
6
7
|
[](https://codecov.io/github/ShadowZ11/nestjs-pdf)
|
|
7
|
-
[](https://www.typescriptlang.org/)
|
|
9
|
+
|
|
8
10
|
|
|
9
11
|
A NestJS library to generate and manipulate PDFs using Puppeteer and multiple template engines, including Handlebars, EJS, Pug, MJML, Nunjucks, Eta and Mustache.
|
|
10
12
|
|
|
@@ -180,6 +182,20 @@ these are the default extra arguments passed to Puppeteer:
|
|
|
180
182
|
|
|
181
183
|
You can use `forRootAsync(...)` if you need to provide configuration asynchronously.
|
|
182
184
|
|
|
185
|
+
## Examples
|
|
186
|
+
|
|
187
|
+
If you want to see a working example, check the `examples` folder and choose one of the subfolders with the engine you want to use.
|
|
188
|
+
These are minimal examples of how to use the library with different template engines. Use Nest.Js documentation to init a real project and integrate the library.
|
|
189
|
+
|
|
190
|
+
If you want to test locally the examples with the entire project, you can follow these steps:
|
|
191
|
+
|
|
192
|
+
- uncomment the `packages` section in the `pnpm-workspace.yaml` file
|
|
193
|
+
- run `pnpm install` to install dependencies
|
|
194
|
+
- set 'workspace:*' in the `package.json` of the example you want to test at the `dependencies` section for the `@shad0wz7/nestjs-pdf` package
|
|
195
|
+
- run `pnpm run build` to build the library
|
|
196
|
+
- run `pnpm run start` in the example folder to start the example application
|
|
197
|
+
- test it
|
|
198
|
+
|
|
183
199
|
## Tests
|
|
184
200
|
|
|
185
201
|
This repository includes unit and integration tests (Jest). To run the tests:
|