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

waterdrop

v1.0.5

Published

node-render

Downloads

3

Readme

WATERDROP(水滴)

node层渲染容器 node >= 7.10.1

文件列表

|____controller
| |____cache.js
| |____log.js
| |____render.js
| |____scan.js
| |____url.js
|____gulpfile.js
|____log
| |____2017-09-07
|____modal
| |____template.js
|____package.json
|____README.md
|____server.js
|____yarn.lock
controller

所有控制器,包括koa需要使用的中间件(middleware)的真正函数体都在这里面

  1. cache: 设置缓存,该容器使用的是对比缓存,使用强制缓存容易导致发布·缓存时间差中无法更新内容
  2. log: 日志,对应的日志文件在log文件夹中,以天为文件名进行日志存储
  3. render: 真正的渲染逻辑,渲染内核使用nunjucks,主要是考虑到认识的一个核心维护者,所以有问题了可以随时解决
  4. scan: 版本扫描,代码为版本式发布,需要在接收到请求时能够访问到当前的最大版本文件,通过url中增加wh_version来制定需要访问的版本,但是发布系统限制,无法使用版本式发布,因此只能暂时阉割该功能
  5. url: 对request的url进行格式化
log

日志文件夹

modal

nunjucks渲染时的底层数据文件

  1. template : 前期保存数据的一个js文件,后续系统完善后会考虑使用在线平台能够进行配置
server

真正的启动函数,包括对应中间件的调用

template

版本式发布之后,真正的保存版本文件的地方,文件夹名称为版本名称(xx.xx.xx)

  1. index.tpl : 渲染时使用的模板文件
  2. index.json: 渲染index.tpl时使用到的数据,会和modal/template.js的内容做一次merge,index.json中的优先级更高
forever.js

在服务端执行操作比较难,所以直接封装了forever.js的操作, node forever.js start # 启动forever node forever.js stop # 停止该进程