Skip to content

Commit

Permalink
removes treeshaking
Browse files Browse the repository at this point in the history
  • Loading branch information
yowainwright committed Nov 15, 2016
1 parent f41fe11 commit 344e5d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
12 changes: 5 additions & 7 deletions dist/shave.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ function shave(target, maxHeight, opts) {
if (typeof window !== 'undefined') {
var plugin = window.$ || window.jQuery || window.Zepto;
if (plugin) {
plugin.fn.extend({
shave: function shaveFunc(maxHeight, opts) {
shave(this, maxHeight, opts);
return this;
}
});
plugin.fn.shave = function shavePlugin(maxHeight, opts) {
shave(this, maxHeight, opts);
return this;
};
}
}

return shave;

})));
})));
2 changes: 1 addition & 1 deletion dist/shave.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 rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
format: 'umd',
moduleName: 'shave',
sourceMap: false, // removes the souremap at the bottom of the file
treeshake: false,
plugins: [
resolve({
jsnext: true,
Expand Down
10 changes: 4 additions & 6 deletions src/shave.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ export default function shave(target, maxHeight, opts) {
if (typeof window !== 'undefined') {
const plugin = window.$ || window.jQuery || window.Zepto;
if (plugin) {
plugin.fn.extend({
shave: function shaveFunc(maxHeight, opts) {
shave(this, maxHeight, opts);
return this;
},
});
plugin.fn.shave = function shavePlugin(maxHeight, opts) {
shave(this, maxHeight, opts);
return this;
};
}
}

0 comments on commit 344e5d2

Please sign in to comment.