svgdotjs / svg.filter.js

A plugin for svg.js adding svg filters
MIT License
218 stars 52 forks source link

How do you actually use this library? #44

Closed nmg196 closed 4 years ago

nmg196 commented 4 years ago

I've been using JS and libraries for years but this one has me totally stumped. How do you actually get the complete JS file? There is no "dist" folder or download link and no CDN URL. All I can find is the file in the src folder but this doesn't seem to work on a page. Where can I download the complete svg.filter.js file?

Thanks!

Fuzzyma commented 4 years ago

unpkg: https://unpkg.com/@svgdotjs/svg.filter.js@3.0.7/dist/svg.filter.min.js jsdelivr: https://cdn.jsdelivr.net/npm/@svgdotjs/svg.filter.js

Beside that you can find the bundled files on the release page: https://github.com/svgdotjs/svg.filter.js/releases/tag/3.0.7

Or build them yourself by downloading this repo.

The file in the repo is an esm module which can be imported like any other javascript module (with import). However, it is quite common to use it together with webpack to get your prodiction bundle.

nmg196 commented 4 years ago

Thanks! I think at one point I had everything set up OK, but the Gaussian blur examples are incorrect in that they call .filter() instead of .filterWith() so even though I'd done everything correctly (after finding the compiled file) I still thought I was doing something wrong.