GithubHelp home page GithubHelp logo

upendra-web / lean-svg Goto Github PK

View Code? Open in Web Editor NEW
55.0 2.0 2.0 334 KB

✂️ Optimize SVG and Flatten transforms and shapes ⚡

Home Page: https://lean-svg.netlify.com/

License: MIT License

JavaScript 43.53% HTML 0.73% Vue 26.20% CSS 29.54%
svg vuejs svgo

lean-svg's Introduction


Lean-SVG

Lean-SVG is a tool, which is being made to optimize SVG and flatten the transforms which are present in SVG. This project is an experiment with Vue.js and SVGO.

Key FeaturesHow to use?TutorialCredits

Screenshot

screenshot

Key Features

  • ✂️ Cut down a lot of redundant and useless information from the SVG, like
    • editor metadata
    • comments
    • hidden elements ... etc
  • Round of the numbers and minify styles
  • 📦 Minify the SVG
  • Flatten transforms (💥 Keep in mind that the Flatten feature is experimental and works on paths. Text flatten is on the way.)
  • Flatten shapes

How to use?

You can use this project online by going to this link

or

locally by cloning and running this application [you'll need Git and Node.js (which comes with npm) installed on your computer]. From your command line:

# Clone this repository
$ git clone https://github.com/upendra-web/lean-svg

# Go into the repository
$ cd lean-svg

# Install dependencies
$ npm install

# Run the app
$ npm start

# Open your browser and goto 'localhost:8080'

Note: If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Tutorial

  • First input a SVG by

    • uploading SVG or pasting markup input
  • Then select or activate the options which you require options

  • You can view the modified SVG and Code with the help of toggle present in Header swatches

  • Finally you can download your optimized SVG or just copy the markup.

  • You change the background of SVG viewer by using background option in Header section. bkg

  • For new SVG you can directly go to the '+' in the header section. input2

Credits

This projects uses

And

  • Great thanks to Jake Archibald, whose SVGOMG code has been a great help to make this project
  • And thanks to the Flatten code provided by Timo in his gist

Todo

  • 🚀 Launch the site
  • ✂️ Remove unused CSS using Purge CSS or something like that.
  • ✂️ Make a stripped down version of site
  • Make a Chrome Extension

Made with ❤️ by U-Web

lean-svg's People

Contributors

upendra-web avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lean-svg's Issues

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.