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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pdf-master-landing

v0.0.8

Published

PDF Master static landing site.

Downloads

902

Readme

PDF Master Landing

PDF Master 的产品介绍页。Vite + React + TypeScript。

与 Flutter Web 的关系

落地页是站点根;Flutter Web 应用部署在 /app/ 子路径下。

集成方式:

  • 构建产物源flutter build web --base-href /app/ --wasm --release<repo>/build/web/
  • 同步点landing/public/app/。vite 把 public/ 在 dev 直接 serve、在 build 拷到 dist/,所以一处同步两处生效。
  • 同步脚本scripts/sync-flutter-web.mjs,挂在 predev / prebuild 钩子上,自动执行。

landing/public/app/ 是构建产物,已 gitignore。

开发

cd landing
npm install

# 第一次跑:先准备 Flutter 产物(一次构建即可,后续不用重复)
npm run sync:app

# 启动 dev server
npm run dev          # http://localhost:5180

npm run dev 会先跑 predev,把现有的 build/web/ 同步到 public/app/(不重新构建 Flutter)。 如果 Flutter 代码有改动,重新跑 npm run sync:app

用 flutter run 热重载联调

不想反复 flutter build web,可以让 Flutter 自己跑独立 dev server:

# 终端 A
cd ..
flutter run -d chrome --web-port 5181

# 终端 B:跳过同步、走 VITE_APP_BASE 切换
echo "VITE_APP_BASE=http://localhost:5181/" > landing/.env.local
SKIP_FLUTTER=1 npm run dev

生产构建

npm run build        # → landing/dist/,包含 dist/app/

prebuild 钩子会先跑 flutter build web + 同步到 public/app/,然后 vite build 把整个 public/ 拷进 dist/

npm 发布与 1Panel 部署

这个项目可以作为 npm 包发布,包内只暴露静态产物 dist/ 和部署脚本。

cd landing
npm publish

服务器上先把包安装到 1Panel 站点目录,再用包内 bin 把公开目录切成软链接:

cd /opt/1panel/www/sites/pdfmaster.top/index
npm install pdf-master-landing@latest
npx pdfmaster-deploy --target .

执行后,/opt/1panel/www/sites/pdfmaster.top/index/dist 会指向 node_modules/pdf-master-landing/dist。OpenResty 当前 root 仍然是 /www/sites/pdfmaster.top/index/dist,不用改 1Panel 站点配置。

同步脚本参数

npm run sync:app             # 构建 + 同步(默认)
npm run sync:app:no-build    # 只同步现有 build/web/,不跑 flutter
SKIP_FLUTTER=1 ...           # 完全跳过(前端纯 UI 联调时用)