Skip to content

Commit

Permalink
update package name to @tillpos/xml-escpos-helper (#5)
Browse files Browse the repository at this point in the history
* rename

* missing package name
  • Loading branch information
lakshmaji-till authored Jan 28, 2021
1 parent 74ef0e5 commit 06715b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Originally forked from [here](https://github.com/ingoncalves/escpos-xml)

# ESC/POS XML

JavaScript library that implements the thermal printer ESC / POS protocol and provides an XML interface for preparing templates for printing. works with **reactjs** and **react-native**
Cross platform JavaScript library that implements the thermal printer ESC / POS protocol and provides an XML interface for preparing templates for printing.


**Features:**
- [x] Text
Expand All @@ -21,20 +22,29 @@ JavaScript library that implements the thermal printer ESC / POS protocol and pr
- [x] XML with mustache
- [ ] Font family

## Tested On (manual)

- [x] React Native (Android)
- [ ] React Native (iOS)
- [ ] React Native Web
- [x] Server side
- [x] Other node environment (terminal)


## Installation

Using yarn:

```
yarn add xml-escpos-helper
yarn add @tillpos/xml-escpos-helper
```

## Usage

### From plain XML
```js

import { EscPos } from 'xml-escpos-helper';
import { EscPos } from '@tillpos/xml-escpos-helper';

const xml = `
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -48,10 +58,10 @@ const buffer = EscPos.getBufferXML(xml);

```

### From XML + Handlebars
### From XML + mustache
```js

import { EscPos } from 'xml-escpos-helper';
import { EscPos } from '@tillpos/xml-escpos-helper';

const xml = `
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -72,7 +82,7 @@ const buffer = EscPos.getBufferFromTemplate(xml, data);
### From Builder
```js

import { EscPos } from 'xml-escpos-helper';
import { EscPos } from '@tillpos/xml-escpos-helper';


const buffer = EscPos.getBufferBuilder()
Expand All @@ -85,7 +95,7 @@ const buffer = EscPos.getBufferBuilder()
## Example

```js
import { EscPos } from 'xml-escpos-helper';
import { EscPos } from '@tillpos/xml-escpos-helper';

const xml = `
<?xml version="1.0" encoding="UTF-8"?>
Expand Down Expand Up @@ -154,7 +164,6 @@ const buffer = EscPos.getBufferFromTemplate(xml, data);
```



# TODO

- [ ] remove build files from source code
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hitz-group/xml-escpos-helper",
"name": "@tillpos/xml-escpos-helper",
"description": "ESC/POS with XML interface",
"keywords": [
"escpos",
Expand Down

0 comments on commit 06715b1

Please sign in to comment.