-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
33 additions
and
28 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 |
---|---|---|
|
@@ -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/[email protected].1/dist/emoji-line-break.canvas2d.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/emoji-line-break.canvas2d.min.js"></script> | ||
``` | ||
|
||
完整版。(`size~62.7kb`) | ||
完整版。(`size~63.4kb`) | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/dist/emoji-line-break.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/emoji-line-break.min.js"></script> | ||
``` | ||
|
||
## 用法 | ||
|
@@ -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 |
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 |
---|---|---|
|
@@ -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/[email protected].1/dist/emoji-line-break.canvas2d.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].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/[email protected].1/dist/emoji-line-break.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/emoji-line-break.min.js"></script> | ||
``` | ||
|
||
## Usage | ||
|
@@ -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 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -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"> 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"> 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> | ||
|
@@ -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> | ||
|
@@ -249,7 +249,7 @@ | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> | ||
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1/dist/emoji-line-break.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/emoji-line-break.min.js"></script> | ||
<script type="text/javascript"> | ||
"use strict"; | ||
|
||
|
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