Skip to content

Commit

Permalink
docs: add white space
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Nov 1, 2023
1 parent 9dd0f09 commit b29b15a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

The documentation for SwissQRBill is located in [github.com/schoero/swissqrbill/docs](https://github.com/schoero/swissqrbill/tree/main/docs).

<br/>

## Getting started

To help you get started, you can follow the guide [how to create a complete qr bill](./how-to-create-a-complete-qr-bill.md) to create your first QR bill.

<br/>

## Importing

Depending on the environment you are using, you may need to import the library differently. The following documentation will help you find the best way to import the library for your environment.
Expand All @@ -15,6 +19,8 @@ Depending on the environment you are using, you may need to import the library d
- [Browser: Bundling with webpack](./importing.md#browser-bundling-with-webpack)
- [Browser: Pre-built bundle](./importing.md#browser-pre-built-bundle)

<br/>

## API documentation

SwissQRBill exposes different classes and functions that can be used to create a QR bill. The API is split into different parts, depending on the use case.
Expand Down
16 changes: 15 additions & 1 deletion docs/migration-v3-to-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ In version 4, the library contains the following parts
- Bundle
- Pre built bundle of the library containing all the parts

<br/>

## Breaking changes

Lots of the API has changed. The following list contains the most important changes.
Expand All @@ -41,6 +43,8 @@ Lots of the API has changed. The following list contains the most important chan
- The table method is now it's own class and has been completely rewritten. As a part of the rewrite, some properties have been renamed. Check the [updated documentation](./pdf/index.md#table) for the new names. The Table class can now also be attached to any existing PDFKit document.
- Events have been removed from SwissQRBill.

<br/>

## Migration

### Importing the library
Expand All @@ -49,6 +53,8 @@ Depending on how you imported the library, you might need to change the import s

Please read the new [importing documentation](./importing.md) for more information and examples on how to import the library now.

<br/>

#### Node.js and self bundling (webpack)

If you used SwissQRBill on the backend, or you have bundled it yourself, you now have to import PDFKit and SwissQRBill separately.
Expand All @@ -64,6 +70,8 @@ import PDFDocument from "pdfkit";
import { SwissQRBill, Table } from "swissqrbill/pdf";
```

<br/>

#### Pre built bundle

If you previously used the pre built bundle, provided by SwissQRBill, you now have to switch to the pre built bundle of PDFKit instead and import SwissQRBill separately.
Expand All @@ -80,6 +88,8 @@ If you previously used the pre built bundle, provided by SwissQRBill, you now ha
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/swissqrbill@beta/lib/pdf/swissqrbill.js"></script>
```

<br/>

### Standalone classes

Since SwissQRBill is now a standalone class, you have to create the PDFDocument separately from the QR slip.
Expand All @@ -99,10 +109,14 @@ const table = new Table({ /* ... */ });
table.attachTo(pdf);
```

<br/>

### PDFKit events

SwissQRBill previously emitted events that could be used to add page numbers to the document. Since the library no longer extends PDFKit, this is no longer possible. You now have to follow the [documentation of PDFKit](http://pdfkit.org/docs/getting_started.html#switching_to_previous_pages) to learn how to add page numbers to your document.

<br/>

### Renamed properties and options

Some properties and options have been renamed. Many properties of the [Table class](./pdf/index.md#table) have been renamed to be more consistent with the rest of the library. Please check out the [new documentation](./pdf/index.md#table) for the new names.
Many properties of the [Table class](./pdf/index.md#table) have been renamed to be more consistent with the rest of the library. Please check out the [new documentation](./pdf/index.md#table) for the new names.

0 comments on commit b29b15a

Please sign in to comment.