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-hile

v1.1.5

Published

Create a new Hile project

Readme

create-hile

基于 @hile/http-next 的项目脚手架,一条命令创建开箱即用的 Hile + Next.js 项目。

使用方式

# 推荐:通过 npx 直接运行
npx create-hile create my-app

# 或全局安装后使用
npm i -g create-hile
create-hile create my-app

创建完成后:

cd my-app
pnpm install
pnpm run dev

生成的项目结构

my-app/
├── public/                    # 静态资源
│   ├── next.svg
│   ├── vercel.svg
│   └── ...
├── src/
│   ├── app/
│   │   ├── layout.tsx         # Next.js 根布局
│   │   ├── page.tsx           # Next.js 首页
│   │   ├── page.module.css    # 页面样式
│   │   ├── globals.css        # 全局样式
│   │   └── click.tsx          # Client 组件示例
│   ├── controllers/
│   │   └── post.controller.ts # API 示例 → GET /-/post
│   ├── models/
│   │   ├── home/
│   │   │   └── home.model.ts  # 首页 defineModel(export default)
│   │   └── post/
│   │       └── post.model.ts  # /-/post defineModel(export default)
│   └── services/
│       └── index.boot.ts      # 服务启动入口(*.boot 须在 src/services/)
├── next.config.ts
├── tsconfig.json               # Node.js 编译
├── tsconfig.next.json          # Next.js 编译
├── eslint.config.mjs
└── package.json

业务数据与 loadModel / defineModelpackages/http-next/SKILL.md 为准:src/models/<领域>/*.model.tsexport default);app / controllers / servicesloadModel 消费 model;page.tsx 使用 loadModelexport const dynamic = "force-dynamic"controllersloadServiceapp 禁止 loadService

生成项目的可用命令

| 命令 | 说明 | |------|------| | pnpm run dev | 构建 Next.js 并以开发模式启动 Hile 服务 | | pnpm run build | 编译 TypeScript 与 Next.js 生产构建 | | pnpm run start | 以生产模式启动 Hile 服务 |

技术栈

生成的项目基于以下依赖:

  • @hile/core — 异步服务容器
  • @hile/http — Koa + find-my-way HTTP 框架
  • @hile/http-next — Next.js 桥接层
  • @hile/cli — 命令行启动器(hile start
  • Next.js 16 — React 服务端渲染与 App Router
  • React 19 — UI 渲染

License

MIT