Code Monkey home page Code Monkey logo

svgo's Introduction

SVGO for Deno

DEPRECATED SVGO provides esm module for browsers, compatible with Deno. https://unpkg.com/[email protected]/dist/svgo.browser.js


SVGO fork to make it work in Deno.

Usage

import { optimize } from "https://raw.githubusercontent.com/lumeland/svgo/deno/mod.js";

const filepath = "assets/my-logo.svg";
const data = await Deno.readTextFile(filepath);

const result = optimize(data, {
  path: filepath,
  plugins: [
    "cleanupAttrs",
    "removeDoctype",
    "removeXMLProcInst",
    //...
  ],
});

console.log(result);

svgo's People

Contributors

alexjlockwood avatar bennyschudel avatar caub avatar davidleston avatar deepsweet avatar dfilatov avatar elidupuis avatar greli avatar jakearchibald avatar joshyphp avatar kt3k avatar lahmatiy avatar meomix avatar nathan-muir avatar oscarotero avatar phihag avatar scurker avatar silentroach avatar sk- avatar strarsis avatar thiakil avatar trysound avatar valtlai avatar vithar avatar volker-e avatar xhmikosr avatar yandavid avatar ydaniv avatar yeti-or avatar zearin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

svgo's Issues

Error from jspm

I've detected this error in svgo plugin:

lume: Cannot read property 'Tag' of undefined
TypeError: Cannot read property 'Tag' of undefined
    at https://jspm.dev/npm:[email protected]/lib/node!cjs:49:56

This happens when domhandler 4.1.0 or upper is installed (It doesn't happen with 4.0.0).

domhandler is a sub-dependency of css-select. Not sure if jspm allows to set a fixed version of any dependency.

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.