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

create-leafer

v2.0.0

Published

An easy way to start a Leafer project.

Downloads

16

Readme

create-leafer

English | 简体中文

create-leafer 是一个用于快速创建Leafer项目的命令行工具。

如果这个项目对你有帮助,请给它一个 star :star: ,谢谢你的支持!欢迎通过 issue 或其他方式反馈 Bug 或提供改进意见。

使用方法

快速创建 Vue + Leafer 模版项目

运行本命令会在当前目录下生成一个 Vue3 + TypeScript + Leafer 的项目模板,用于快速构建 leafer 体验环境。

npm create leafer@latest vue-template
在项目中引入 Leafer

该命令会以引导交互的方式在当前的项目中引入 leafer 依赖。

npm create leafer@latest init

需要在一个项目(目录下有 package.json 文件)中运行本命令,推荐先使用vitewebpack等构建工具先自由的配置你的项目环境,再使用本命令丝滑引入leafer依赖。

添加或删除项目中的 leafer 依赖

修改当前项目中的 leafer 依赖。

npm create leafer@latest add

该命令会以引导交互的方式添加或删除当前项目中需要的 leafer 依赖。运行的项目中需要包含 leafer 相关依赖。

更新项目中的 leafer 依赖版本号

检查并更新项目中的 leafer 依赖版本号。

npm create leafer@latest update

本命令会读取本项目所有 leafer 相关的依赖,同时获取 leafer 的最新版本,修改 package.json 中相关的版本号。 运行完成后,需要执行包管理器的安装命令安装依赖,如出现旧版本缓存冲突导致的报错,需要删除 lock 文件重新安装。

快速创建 LeaferX 插件模版

该命令会帮助你生成一个 LeaferX 的项目模板,供插件/上层应用开发。

npm create leafer@latest plugin

详见插件开发

全局安装

你也可以全局安装 create-leafer 来使用本工具。

全局安装虽然命令更简短,但是更推荐使用npm create leafer@latest的方式自动使用最新的 create-leafer 版本。如果使用全局安装,请及时更新以使用最新特性和更稳定的版本。

npm install -g create-leafer@latest

全局安装后,可以使用create-leafer或者leafer命令来运行功能

npx leafer vue-template
npx leafer init
npx leafer plugin
...