Code Monkey home page Code Monkey logo

Comments (17)

strarsis avatar strarsis commented on July 20, 2024 5

@haydenbleasel: Native JavaScript SVG solution, seems also be usable with nodejs (server side): https://github.com/canvg/canvg - so this would finally be possible 😄 .

from favicons.

Hypnosphi avatar Hypnosphi commented on July 20, 2024 1

@strarsis you would need node-canvas for that, which uses native package cairo

from favicons.

Hypnosphi avatar Hypnosphi commented on July 20, 2024 1

What about sharp?

Most modern 64-bit OS X, Windows and Linux (glibc) systems running Node versions 4, 6, 8 and 10 do not require any additional install or runtime dependencies.

from favicons.

rommelmamedov avatar rommelmamedov commented on July 20, 2024 1

What about this? https://github.com/neocotic/convert-svg

from favicons.

cloud-walker avatar cloud-walker commented on July 20, 2024

What about librsvg?

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

@cloud-walker It relies on the librsvg package from Brew / Yum / Apt-Get. The solution needs to be 100% JS. Good find though, probably the closest solution thus far.

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

No luck so far :(

from favicons.

langri-sha avatar langri-sha commented on July 20, 2024

Would installing optional (native) dependencies be acceptable?

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

@langri-sha possibly, what do you have in mind?

from favicons.

langri-sha avatar langri-sha commented on July 20, 2024

Well, 2gis/node-rsvg seems to hit home pretty close, in the here and now. Would it be acceptable to add it as a optional dependency and perform a runtime check when a SVG asset is provided?

I'm just assuming there is a sizable portion of users which already have their logo vectors provided in SVG, who are then exporting a PNG to be able to use the package and if perhaps compromising with an optional dependency might be permissive.

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

@langri-sha I love the look of that module but it definitely requires the native deps. I want to compromise but Google's planning on using this for WSK and their main issue was with native deps. Plus, I'm aiming for a pure JS build system hence the switch to Jimp.

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

Documented in the README for now, we'll come back to this when possible.

from favicons.

haydenbleasel avatar haydenbleasel commented on July 20, 2024

Update: If you're using Gulp, you can pipe from svg2png for now.

from favicons.

strarsis avatar strarsis commented on July 20, 2024

Why is a pure JavaScript solution for SVG rendering required?
Isn't this a build tool and usually run on nodejs (with bindings)?

from favicons.

stavarengo avatar stavarengo commented on July 20, 2024

Weird thing, in my machine Ubuntu 15.10 with Node 6.6.0 e npm 3.10.3 it works when I use an SVG image.
But, at my server machine (in the cloud) it does not work. The server machine is a Ubuntu 14.04 with Node 6.6.0 and npm 3.10.3.

The only diff between these machines is the Ubuntu version.
You guys have any ideia why this happens?

from favicons.

JoshuaWalsh avatar JoshuaWalsh commented on July 20, 2024

@Hypnosphi It appears that as of #221 Sharp is now used.

from favicons.

ecstrema avatar ecstrema commented on July 20, 2024

So if sharp is now used, what is the status of

Why are you missing certain favicons?

from favicons.

Related Issues (20)

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.