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

zipaper

v0.2.1

Published

一个简单易用的小巧前端框架

Downloads

287

Readme

Zipaper

一个简单易用的小巧前端框架

如何使用?

首先,你需要安装必要的依赖:

npm install --save zipaper

然后,基本的项目结构如下:

- components 可选,自定义组件
- directives 可选,自定义指令
- pages 页面(和自定义组件一样)
- main.js 入口
- router.config.js 定义路由
- index.html 
- package.json

在入口文件挂载好必要的内容后,启动即可,比如:

import { createApp } from "zipaper"

import App from "./pages/App/index.js"
import router from "./router.config.js"
import uiInput from "./components/ui-input/index.js"
import zMaxlen from "./directives/z-maxlen.js"

createApp(App)
    .use(router) // 路由
    .component("ui-input", uiInput) // 注册组件
    .directive("maxlen", zMaxlen) // 注册指令
    .mount(document.getElementById("root")) // 挂载到页面

具体页面、组件、指令和路由的定义,你可以访问 在线文档 进行了解。

此外,在实际开发中,为了简化开发者的麻烦,一般template部分不会直接手写,可以借助库xhtml-to-json来辅助:

npm install --save-dev xhtml-to-json

然后,使用其把html字符串变成需要的template格式:

const { parseTemplate } = require("xhtml-to-json");

let template = parseTemplate("html字符串").toJson();

这里正常是在nodejs环境,比如开发一个webpack的loader。

一个完整的项目搭建用例,你可以访问: https://github.com/rapid-start/Zipaper-project

版权

MIT License

Copyright (c) zxl20070701 走一步,再走一步