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

@cendo91/create-web-base

v0.1.5

Published

Create a Next.js project for PC or mobile H5.

Readme

create-web-base

用一份 Next.js、React、TypeScript 和 SCSS 底座创建网站和移动 H5 项目。

创建项目

npm 发布后可直接运行。

npm create @cendo91/web-base@latest -- my-web-app
npm create @cendo91/web-base@latest -- my-pc-site --preset pc

在源码目录里也可以直接运行 CLI。

node bin/create-web-base.mjs my-web-app
node bin/create-web-base.mjs my-pc-site --preset pc

命令接受一个尚未存在的目标目录,父目录需要先创建。

需要 Node.js 20.9 或更高版本。进入生成的项目,执行 corepack pnpm install --frozen-lockfile 和 corepack pnpm dev。有 pnpm 9.15.3 时也可直接执行 pnpm install --frozen-lockfile 和 pnpm dev。

两种模板都预设 env/.env.local、env/.env.staging 和 env/.env.production。默认 pnpm dev 读取本地环境文件。env/.env.example 说明变量用途,Dockerfile.example 供部署时参考。配置和部署命令见 环境变量与部署。

默认生成一个流式布局示例。在 src/project.config.ts 按需设置全屏安全区、固定底栏、主屏幕打开方式和设计稿换算。目录、配置和用法见生成项目说明。

--preset pc 生成含顶部导航、1280px 内容容器、首页和资源目录的桌面站起点。通过 src/project.config.ts 配置站点名称和 SEO。PC 预设提供自己的配置类型,手动添加移动布局、主屏幕模式或设计稿换算字段会触发类型错误。用法见 PC 预设说明。

本地打包

npm pack
npm exec --package=./cendo91-create-web-base-0.1.5.tgz -- create-web-base --version

打出的包包含 CLI 和通用模板。将上例的 --version 替换为一个新目录名,即可验证项目生成。

默认模板和 PC 预设各有一份 pnpm 锁文件。修改共享依赖后,同步更新两份锁文件,并用生成项目的 pnpm install --frozen-lockfile 校验。