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 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-zepto-pro

v2.7.0

Published

a generator based jquery and zepto for mobile sites

Downloads

16

Readme

generator-zepto-pro

jquery zepto项目脚手架 支持热更新、mock数据、命令行新增模版页面

####ChangeLog

  • 1.1.0 测试版本发布
  • 1.10.0 框架新特性功能: 命令行添加新页面模版(在对应目录下新增css、js、html, 并在html中填入对应新增文件链接)
  • 2.0.0 LTS 稳定版本: windows bug、cnpm镜像同步问题修复

####Install

sudo npm install yo generator-zepto-pro -g

####How to use

  • 安装脚手架
mkdir webapp && cd webapp
yo zepto-pro
npm run dev:mobile 启动服务
npm run dev:mobile:mock 启动服务(mock代理协议)
npm run build:mobile 打包编译
npm run dev:pc
npm run dev:pc:mock
npm run build:pc
npm run mock 启动mock服务
  • 添加新页面模版
yo zepto-pro:router --mode=mobile --name=新页面名称 mobile项目添加新页面
yo zepto-pro:router --mode=pc --name=新页面名称 pc项目添加新页面
  • 动态生成新页面html, 并插入对应css、js文件链接
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <% if (is_mobile) { %>
    <meta name="theme-color" content="#f60">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <% } %>
    <title><%= name %></title>
    <link rel="stylesheet" href="../css/common.min.css">
  </head>
  <body>
    <div class="<%= name %>"><%= name %></div>
  <% if (is_mobile) { %>
  <script src="http://apps.bdimg.com/libs/zepto/1.1.4/zepto.min.js"></script>
  <% } else { %>
  <script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
  <% } %>
  <script src="../js/common.js"></script>
  <script src="../js/<%= name %>.js"></script>
  </body>
</html>

####Issues

  • 淘宝镜像源同步npm官方包出现问题
  • cnpm版本落后于npm官方需手动同步代码包
cnpm sync generator-zepto-pro
cnpm install generator-zepto-pro -g