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

@libwebp-wasm/gif2webp

v1.0.5

Published

A wasm version for gif2webp of libwebp

Downloads

185

Readme

Gif2Webp

介绍

通过使用 Emscripten 编译器的方式,从而实现 libwebp 项目从 C/C++ 到 WASM 的转变。大致的流程如下:

Emscripten 编译流程

使用

安装

工具链

主要包括安装 emsdkcmake 以及 pnpm,具体的安装方式可以参考 Emscripten 官方文档pnpm 官方文档以及安装 cmake

submodule

git submodule update --init --recursive --remote --rebase

构建

MacOS

在使用 zsh 的情况下,推荐安装 dotenv 插件,这样就可以实现一些功能,比如在当前目录存在 .env 文件的情况下设置环境变量。

pnpm build:mac

Docker

构建镜像
docker build -f ./docker/Dockerfile -t libwebp-wasm/gif2webp:latest .
运行镜像
docker run --rm  -v $(pwd)/dist:/gif2webp/dist -v $(pwd)/es:/gif2webp/es -v $(pwd)/lib:/gif2webp/lib libwebp-wasm/gif2webp

其它

注意:现在是通过运行 git apply 命令的方式,实现修改上游 submodule 项目代码的目的。所以,有时候需要在 submodule 目录下提交自己的 commit,然后手动执行生成 patch 的操作。

pnpm build:patch

例子

License

MIT