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

@yichong6/create-canva

v0.1.0

Published

Short command entry point for the YiChong Canva app scaffold

Readme

@yichong6/create-canva

为 YiChong Canva 应用创建独立工程的简短命令入口。需要 Node.js 22 或 24;不需要 npm 登录即可下载公共包。

npm create @yichong6/canva -- --channel my_app --name "My App"

也可以使用:

npx @yichong6/create-canva --channel my_app --name "My App"

默认在当前目录创建 my_app,生成 50 个文件,包括 index / progress / result 页面、账户与额度 UI、内容审核、生成任务恢复、图片保存和 Canva 插入。现有目录不会被覆盖。

此包只是命令入口,精确依赖 @yichong6/[email protected],复用其生成器;不复制模板或业务逻辑。当前生成应用依赖 @yichong6/[email protected]。无参数或 --help 显示帮助,不进入交互问答。

参数

| 参数 | 用途 | | --- | --- | | --channel <channel> | 必填,已登记的后端渠道;小写字母开头,可包含数字、下划线与连字符 | | --name <display-name> | 必填,应用显示名称 | | --directory <new-directory> | 指定新应用目录,父目录必须存在;默认 <cwd>/<channel> | | --app-id <id> | 本应用自己的 Canva App ID,可稍后配置 | | --port <port> | 本地开发端口,默认 8080,范围 1024–65535 | | --api-base-url <https-origin> | 后端服务 origin,默认 https://api.imgkits.com | | --core-path <directory> | 本地工具包联调;校验包名后生成相对 file: 依赖 | | --help | 显示帮助 |

相对输出路径不接受 ..;输出到另一个位置时可以显式传绝对路径。参数与安全检查由 scaffold 统一处理。

创建后

  1. 配置自己的 app.json:Canva App ID、已登记渠道和 quota.freeBalanceMode;核对 .env.template 中的 App ID 与端口。
  2. 在 src/generation/model.ts 确认模型 owner/name、输入参数、单张 PNG 输出合同及积分单价。默认未配置时不能发起生成。
  3. 进入应用目录执行 npm install。本地 postinstall 仅在 .env 不存在时从 .env.template 创建它。
  4. 执行 npm run check:config、npm run lint:types、npm run lint、npm test -- --runInBand 和 npm run build。
  5. 执行 npm start,在 Canva Developer Portal 配置自己的应用、开发 URL 和权限,再做真实宿主联调。

入口和生成器不会自动安装生成应用的依赖、登记渠道、创建付费任务或发布 Canva 应用。公开安装不代表拥有公司后端权限;需要正常登记和授权。详细模板说明见 scaffold 使用文档。

维护与发布检查

在本包源码目录执行 npm ci、npm run check:release。测试验证真实命令的帮助、参数透传、目录保护、非法参数退出码,以及 tarball 离线安装后生成完整 50 文件应用。npm pack 和从源码目录发布会先运行门禁;用于检查的嵌套打包显式禁用脚本以避免递归。

发布包不包含测试和本地依赖,只有入口、说明、许可证和 npm 必需的 package.json。发布前以实际 tarball 为准进行检查;已审核 tarball 本身不会重新执行源码门禁。

版权

公共分发不等同于开源授权。此入口包的 YiChong 原代码保留版权,使用遵循已有或另行取得的授权;依赖及生成应用保留各自的许可证,见 LICENSE.md。