Skip to content

Commit

Permalink
Merge pull request #51 from tomik23:drop-console
Browse files Browse the repository at this point in the history
fix: Drop console
  • Loading branch information
tomickigrzegorz committed May 26, 2022
2 parents c60f6a7 + d4b8920 commit 72d55c1
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 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.3/dist/js/showMore.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tomik23/show-more@1.1.4/dist/js/showMore.min.js"></script>
```

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

-- OR --
Expand Down Expand Up @@ -283,7 +283,7 @@ Configuration for IE:

### cdn

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

### cdn polyfill from npm

Expand Down
1 change: 0 additions & 1 deletion 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.

1 change: 0 additions & 1 deletion 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.

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

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

1 change: 0 additions & 1 deletion dist/js/showMore.umd.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.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/global.css.map

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

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

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

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "show-more-read",
"version": "1.1.3",
"version": "1.1.4",
"main": "dist/js/showMore.js",
"description": "JavaScript library that truncates text, list or table by chars, elements or rows",
"author": "Grzegorz Tomicki",
Expand Down
8 changes: 7 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ export default [
format: "iife",
sourcemap: false,
file: "dist/js/showMore.min.js",
plugins: [terser({ ...terserConfig })],
plugins: [
terser({
...terserConfig,
compress: { drop_console: true, drop_debugger: true },
}),
],
},
},
{
Expand All @@ -85,6 +90,7 @@ export default [
PRODUCTION &&
terser({
...terserConfig,
compress: { drop_console: true, drop_debugger: true },
}),
!PRODUCTION && serve({ open: true, contentBase: ["docs"] }),
!PRODUCTION && livereload(),
Expand Down
2 changes: 1 addition & 1 deletion sources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class ShowMore {
const limitCounts = limit + after;
const ellips = ellipsis === false ? "" : "...";

console.log(nobutton);
// console.log(nobutton);

// text
if (type === "text") {
Expand Down

0 comments on commit 72d55c1

Please sign in to comment.