Skip to content

Commit

Permalink
Merge pull request #12 from kozakdenys/v1
Browse files Browse the repository at this point in the history
V1
  • Loading branch information
kozakdenys committed Oct 31, 2019
2 parents cf67239 + e26788c commit 489e90b
Show file tree
Hide file tree
Showing 70 changed files with 5,088 additions and 965 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{js, ts}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lib
node_modules
coverage
/*.*
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
env: {
node: true
},
parser: '@typescript-eslint/parser',
extends: [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
parserOptions: {
sourceType: "module"
}
};
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# IDEA
.idea

# Build folder
/dist

# Lib folder
/lib

# npm modules
/node_modules
/node_modules

# Tests coverage results
/coverage
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: "none",
singleQuote: false,
printWidth: 120,
tabWidth: 2
};
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

JavaScript library for generating QR codes with a logo and styling.

If you have issues / suggestions / notes / questions, please make a pull request or contact me. Let's create a usable library together.
### Examples
<p float="left">
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/app/assets/facebook_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/app/assets/instagram_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/app/assets/telegram_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/facebook_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/instagram_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/telegram_example.png" width="240" />
</p>

### Installation
Expand All @@ -30,7 +31,7 @@ npm install qr-code-styling
<div id="canvas"></div>
<script type="text/javascript">
const qrCode = new QrCodeStyling({
const qrCode = new QRCodeStyling({
width: 300,
height: 300,
data: "https://www.facebook.com/",
Expand All @@ -52,8 +53,8 @@ npm install qr-code-styling

### API Documentation

#### QrCodeStyling instance
`new QrCodeStyling(options) => QrCodeStyling`
#### QRCodeStyling instance
`new QRCodeStyling(options) => QRCodeStyling`

Param |Type |Description
-------|------|------------
Expand Down Expand Up @@ -100,19 +101,25 @@ Property|Type |Default Value
--------|------|-------------
color |string|`'#fff'`

#### QrCodeStyling methods
`QrCodeStyling.append(container) => void`
#### QRCodeStyling methods
`QRCodeStyling.append(container) => void`

Param |Type |Description
---------|-----------|-----------
container|DOM element|This container will be used for appending of the QR code

`QrCodeStyling.update(options) => void`
`QRCodeStyling.update(options) => void`

Param |Type |Description
-------|------|--------------------------------------
options|object|The same options as for initialization

`QRCodeStyling.download(extension) => void`

Param |Type |Default Value
---------|------------------------------|-------------
extension|string (`'png' 'jpeg' 'webp'`)|`'png'`

### License

[MIT License](https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/LICENSE). Copyright (c) 2019 Denys Kozak
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Binary file removed app/assets/fb_logo.png
Binary file not shown.
Binary file removed app/assets/fb_logo_resized.png
Binary file not shown.
Binary file removed app/assets/instagram.png
Binary file not shown.
Binary file removed app/assets/telegram.png
Binary file not shown.
Binary file removed app/assets/youtube.png
Binary file not shown.
10 changes: 0 additions & 10 deletions app/index.html

This file was deleted.

26 changes: 0 additions & 26 deletions app/index.js

This file was deleted.

55 changes: 0 additions & 55 deletions configs/webpack.config.app.js

This file was deleted.

44 changes: 0 additions & 44 deletions configs/webpack.config.lib.js

This file was deleted.

Loading

0 comments on commit 489e90b

Please sign in to comment.