npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@resvg/resvg-js-cli

v2.6.2-beta.1

Published

A high-performance SVG renderer CLI, powered by resvg-js and Rust based resvg and napi-rs

Downloads

75

Readme

resvg-js: a high-performance SVG renderer and toolkit, powered by Rust based resvg, with Node.js backend using napi-rs, also a pure WebAssembly backend.

Installation

Direct Use

npx @resvg/resvg-js-cli --help
# or
bunx @resvg/resvg-js-cli --help

Global Install

npm install -g @resvg/resvg-js-cli
resvg-js --help

Usage

$ npx @resvg/resvg-js-cli --help

NAME:
    resvg-js - A high-performance SVG renderer CLI, powered by resvg-js and Rust based resvg and napi-rs

WEBSITE:
    https://github.com/Zhengqbbb/resvg-js-cli
    https://github.com/yisibl/resvg-js

VERSION: 2.6.1

SYNOPSIS:
    resvg-js [OPTIONS] <input_svg_path> [output_path]   # If empty output_path. The raw data of image to stdout
    resvg-js [OPTIONS] - [output_path]                  # Receives svg string from stdin

OPTIONS:
  Font:
    --no-system-font                Unuse system font, it will be faster
    --font-file        <file_path>  Local font file path   [Mutilple]
    --font-dir          <dir_path>  Local font directories [Mutilple]
    --font-default-size      <num>  Default font size      [Default: 12]
    --font-default-family    <str>  The default font family
    --font-serif-family      <str>  The serif font family
    --font-sans-serif-family <str>  The sans-serif font family
    --font-cursive-family    <str>  The cursive font family
    --font-fantasy-family    <str>  The fantasy font family
    --font-monospace-family  <str>  The monospace font family

  Rendering Optimize:
    --shape-rendering <0|1|2>       Shape rendering optimize rule
        [0: optimizeSpeed, 1: crispEdges, 2: geometricPrecision]
    --text-rendering  <0|1|2>       Text rendering optimize rule
        [0: optimizeSpeed, 1: optimizeLegibility, 2: geometricPrecision]
    --image-rendering <0|1>         Image rendering optimize rule
        [0: optimizeQuality, 1: optimizeSpeed]

  Fit To (default use original):
    --fit-width   <num>             Use fit to width mode
    --fit-height  <num>             Use fit to height mode
    --fit-zoom    <num>             Use fit to zoom mode

  Crop:
    --crop-top    <num>             Crop image top size
    --crop-left   <num>             Crop image left size
    --crop-right  <num>             Crop image right size
    --crop-bottom <num>             Crop image bottom size

    --dpi        <num>              Dots Per Inch
    --language   <lang>             Language code [Mutilple]
    --background <CSS3_color>       Background color
    --log-level  <level>            Setting log level
        [level: "off" | "error" | "warn" | "info" | "debug" | "trace"]

ARGS:
    <input_file_path>               SVG file path. Use "-" for stdin
    [output_file_path]              Output image file path

EXAMPLES:
  $ resvg-js input.svg output.png
  $ resvg-js --fit-width 1200 input.svg output.png
  $ resvg-js \
        --no-system-font                    \
        --font-file "./Font-Light.ttf"      \
        --font-file "./Font-Bold.ttf"       \
        --font-default-family "Font"        \
        --background "rgba(238,235,230,.9)" \
        ./input.svg ./output.png
  $ cat a.svg | resvg-js --fit-width 1200 --image-rending 0 - output.png

Contributing

pnpm install
pnpm dev        # dev mode
pnpm x --help   # start up the CLI and development

License

Please use all lowercase resvg-js when referencing project names.

MPLv2.0

Copyright (c) 2024, Zhengqbbb Copyright (c) 2021-present, yisibl(一丝)