Giter Club home page Giter Club logo

svg-gobbler's Introduction

๐Ÿš€ Where to install

This extension is available on:


Features

SVG Gobbler is a browser extension that finds the SVG content in your current tab and lets you optimize, download, copy, edit, or export.

Find SVGs

  • Quickly find SVGs from a site by various placement methods like base64 or background src
  • Handle CORs restricted SVGs from a page
  • Find individual sprite SVG instances

Export SVGs

  • Export as SVG, PNG, WEBP, JPEG and various other formats
  • Transform SVGs into minified Data URIs
  • Transform SVGs into React components with SVGR
  • Optimize and minify SVGs with SVGO

Organize SVGs

  • Group and categorize SVGs by their primary domain or custom collection name
  • Move, copy, duplicate, and optimize icons before sharing
  • Save and store a set of uploaded SVGs for optimization

Local development

Before making edits you will need to build the extension locally and side load it as a developer extension to test any changes.

The sourcing and processing logic is abstracted into a separate package called svg-gobbler-scripts here.

1. Clone the repo

Clone the repo to your local machine and navigate into the root directory.

cd svg-gobbler

2. Install dependencies

SVG Gobbler uses yarn to build the necessary dependencies.

yarn

3. Start and watch a build

For development with hot reloading use Vite:

yarn dev

This will build to the dist folder. To load the extension, open the Extensions Dashboard, enable "Developer mode", click "Load unpacked", and choose the dist folder.

When you make changes in src the background script and any content script will reload automatically.

4. Start the server

For a majority of the functionality you won't need a server. If you want to make some local fetch calls related to Node processes in a separate terminal session cd into the server directory.

cd server

Install the necessary dependencies

yarn

From this directory, compile the server function to the dist folder.

yarn build

In a separate terminal session serve the function on a local server.

yarn serve

This will startup the server and restart it any time a change is recompiled.


About

5 versions and 5+ years ago, this started as a pet project to improve the SVG Crowbar tool that is no longer being maintained by NY Times.

Powered by

This project benefits from some incredibly talented folks.

Open source

This extension is open source and doesn't collect any information from users. It's free, and made available because I enjoy making useful things for the web. Please consider contributing with an idea, bug fix, or feature request.


More apps by me

I like making things. Check out what I'm up to lately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.