-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f24b904
Showing
26 changed files
with
26,111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"istanbul" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
last 2 versions | ||
ie >= 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"root": true, | ||
"extends": "airbnb-base", | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
"no-param-reassign": "off", | ||
"valid-jsdoc": ["error", { | ||
"requireReturn": false | ||
}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.map | ||
_* | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: node_js | ||
node_js: | ||
- "node" | ||
script: | ||
- npm run lint | ||
- npm run build | ||
- npm test | ||
after_success: npm run codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## 1.0.0 (Oct 21, 2018) | ||
|
||
- Supports 3 props (options): `value`, `options` and `tag`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright 2018-present Chen Fengyuan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# vue-barcode | ||
|
||
[![Build Status](https://travis-ci.org/fengyuanchen/vue-barcode.svg)](https://travis-ci.org/fengyuanchen/vue-barcode) [![Coverage Status](https://img.shields.io/codecov/c/github/fengyuanchen/vue-barcode.svg)](https://codecov.io/gh/fengyuanchen/vue-barcode) [![Downloads](https://img.shields.io/npm/dm/@chenfengyuan/vue-barcode.svg)](https://www.npmjs.com/package/@chenfengyuan/vue-barcode) [![Version](https://img.shields.io/npm/v/@chenfengyuan/vue-barcode.svg)](https://www.npmjs.com/package/@chenfengyuan/vue-barcode) | ||
|
||
> Bar code component for [Vue.js](https://vuejs.org), bases on [JsBarcode](https://github.com/lindell/JsBarcode). | ||
- [Website](https://fengyuanchen.github.io/vue-barcode) | ||
|
||
## Table of contents | ||
|
||
- [Main](#main) | ||
- [Getting started](#getting-started) | ||
- [Props](#props) | ||
- [Browser support](#browser-support) | ||
- [Versioning](#versioning) | ||
- [License](#license) | ||
|
||
## Main | ||
|
||
```text | ||
dist/ | ||
├── vue-barcode.js (UMD) | ||
├── vue-barcode.min.js (UMD, compressed) | ||
├── vue-barcode.common.js (CommonJS) | ||
└── vue-barcode.esm.js (ES Module) | ||
``` | ||
|
||
## Getting started | ||
|
||
### Install | ||
|
||
```shell | ||
npm install @chenfengyuan/vue-barcode vue | ||
``` | ||
|
||
In browser: | ||
|
||
```html | ||
<script src="/path/to/vue.js"></script> | ||
<script src="/path/to/vue-barcode.js"></script> | ||
<script>Vue.component(VueBarcode.name, VueBarcode);</script> | ||
``` | ||
|
||
### Usage | ||
|
||
```js | ||
import Vue from 'vue'; | ||
import VueBarcode from '@chenfengyuan/vue-barcode'; | ||
|
||
Vue.component(VueBarcode.name, VueBarcode); | ||
``` | ||
|
||
```html | ||
<barcode value="Hello, World!" :options="{ displayValue: false }"></barcode> | ||
``` | ||
|
||
[⬆ back to top](#table-of-contents) | ||
|
||
## Props | ||
|
||
### value | ||
|
||
- Type: `String` | ||
|
||
The value of the bar code. | ||
|
||
### options | ||
|
||
- Type: `Object` | ||
|
||
The options for the bar code generator. References the [JsBarcode's options](https://github.com/lindell/JsBarcode#options). | ||
|
||
### tag | ||
|
||
- Type: `String` | ||
- Default: `'canvas'` | ||
- Options: `'canvas'`, `'svg'` and `'img'` | ||
|
||
The tag name of the component's root element. | ||
|
||
## Browser support | ||
|
||
- Chrome (latest) | ||
- Firefox (latest) | ||
- Safari (latest) | ||
- Opera (latest) | ||
- Edge (latest) | ||
- Internet Explorer 9+ | ||
|
||
## Versioning | ||
|
||
Maintained under the [Semantic Versioning guidelines](https://semver.org). | ||
|
||
## License | ||
|
||
[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com) | ||
|
||
[⬆ back to top](#table-of-contents) |
Oops, something went wrong.