Skip to content

Commit

Permalink
update:emoji-regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Yayure committed Apr 12, 2020
1 parent 47a6e47 commit f673de0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 28 deletions.
13 changes: 8 additions & 5 deletions README.ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ var emojiLineBreak = require('emoji-line-break');
>如果您使用babel将es6转换为es5则必须**禁用@babel/plugin-transform-unicode-regex**。([例如](./webpack.config.js#L42)
### 浏览器
如果您可以提供[canvas2d](#canvas2d-可选项),可以使用这个更小的版本。(`size~14.6kb`
如果您可以提供[canvas2d](#canvas2d-可选项),可以使用这个更小的版本。(`size~15.3kb`
```html
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.1/dist/emoji-line-break.canvas2d.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.2/dist/emoji-line-break.canvas2d.min.js"></script>
```

完整版。(`size~62.7kb`
完整版。(`size~63.4kb`
```html
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.1/dist/emoji-line-break.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.2/dist/emoji-line-break.min.js"></script>
```

## 用法
Expand Down Expand Up @@ -132,6 +132,9 @@ result: [

设置文本容器宽度,单位只支持`px`

## 依赖库
- [@mathiasbynens/emoji-regex](https://github.com/mathiasbynens/emoji-regex)

## License

[MIT](https://github.com/Yayure/emoji-line-break.js/blob/master/LICENSE)
[MIT](https://github.com/Yayure/emoji-line-break.js/blob/master/LICENSE) © Yayure
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ var emojiLineBreak = require('emoji-line-break');
>You should **disable @babel/plugin-transform-unicode-regex** if you use babel to convert es6 to es5. ([e.g](./webpack.config.js#L42))
### Browser
You can use this smaller version if you can provide the [canvas2d](#canvas2d-optional). (`size~14.6kb`)
You can use this smaller version if you can provide the [canvas2d](#canvas2d-optional). (`size~15.3kb`)
```html
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.1/dist/emoji-line-break.canvas2d.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.2/dist/emoji-line-break.canvas2d.min.js"></script>
```

Full ver. (`size~62.7kb`)
Full ver. (`size~63.4kb`)
```html
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.1/dist/emoji-line-break.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.2/dist/emoji-line-break.min.js"></script>
```

## Usage
Expand Down Expand Up @@ -128,7 +128,9 @@ Set the font size, only supports `px`.

Set the width of the text container, only supports `px`.

## Dependencies
- [@mathiasbynens/emoji-regex](https://github.com/mathiasbynens/emoji-regex)

## License

[MIT](https://github.com/Yayure/emoji-line-break.js/blob/master/LICENSE)
[MIT](https://github.com/Yayure/emoji-line-break.js/blob/master/LICENSE) © Yayure
6 changes: 3 additions & 3 deletions dist/emoji-line-break.canvas2d.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/emoji-line-break.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/dist/emoji-line-break.canvas2d.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/dist/emoji-line-break.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<body>
<header class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="https://github.com/Yayure/emoji-line-break.js">emoji-line-break.js<small class="h6">&ensp;v1.1.1</small></a>
<a class="navbar-brand" href="https://github.com/Yayure/emoji-line-break.js">emoji-line-break.js<small class="h6">&ensp;v1.1.2</small></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down Expand Up @@ -228,10 +228,10 @@
</div>

<div class="input-group input-group-sm">
<button type="button" class="btn btn-primary" id="fullver">Download full ver <small>(~62.7kb)</small> </button>
<button type="button" class="btn btn-primary" id="fullver">Download full ver <small>(~63.4kb)</small> </button>
</div>
<div class="input-group input-group-sm">
<button type="button" class="btn btn-primary" id="canvas2dver">Download canvas2d ver <small>(~14.6kb)</small> </button>
<button type="button" class="btn btn-primary" id="canvas2dver">Download canvas2d ver <small>(~15.3kb)</small> </button>
</div>
</div>
</div>
Expand All @@ -249,7 +249,7 @@
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.1/dist/emoji-line-break.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/emoji-line-break@1.1.2/dist/emoji-line-break.min.js"></script>
<script type="text/javascript">
"use strict";

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emoji-line-break",
"version": "1.1.1",
"version": "1.1.2",
"description": "Split emoji text into multiple lines.",
"main": "./src/index.js",
"scripts": {
Expand Down Expand Up @@ -39,6 +39,6 @@
"webpack-cli": "^3.3.11"
},
"dependencies": {
"emoji-regex": "^8.0.0"
"emoji-regex": "^9.0.0"
}
}

0 comments on commit f673de0

Please sign in to comment.