mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2024-12-21 19:08:24 +01:00
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# Contribute
|
|
|
|
This file should introduce you with the concepts and tools used in this project.
|
|
|
|
## PDF Library Docs
|
|
- [pdf-lib](https://pdf-lib.js.org) - js
|
|
- [pdfcpu](https://pdfcpu.io) - go-wasm
|
|
- [opencv-wasm](https://www.npmjs.com/package/opencv-wasm) - ?-wasm
|
|
- [pdfjs](https://www.npmjs.com/package/pdfjs-dist) - js
|
|
|
|
## Adding a PDF Function
|
|
|
|
In order to add a PDF-Function there are several files that need to be changed. If the function is on the backend only, or on only on the frontend, you just need to add it to one of the locations. If it is available on both, you need to update both locations.
|
|
Dependency Injection is used to accomodate for different imports across platforms.
|
|
|
|
Backend functions can have different implementations than their frontend counterparts if neccesary. Otherwise they can just link to their frontend implementation.
|
|
|
|
Registering functions will also pass them their dependencies for the specific target platform (Node, Browser)
|
|
|
|
[Traverse Operations](/public/traverseOperations.js)\
|
|
|
|
### Backend
|
|
|
|
[Register Functions](/functions.js)\
|
|
[Functions Folder](/functions/)
|
|
|
|
Examples that go in the node-functions folder: server-side-only functions, different implementation for backend
|
|
|
|
### Frontend
|
|
|
|
[Register Functions](/public/functions.js)\
|
|
[Functions Folder](/public/functions/)
|
|
|
|
Examples that go in the browser-functions folder: client-side-only functions, shared functions
|