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

zeta-renderer

v0.0.28

Published

renderer~

Downloads

21

Readme

[email protected]

安装

$ npm install -g zeta-renderer

使用

在编译后的工程根目录下执行:

$ renderer -p 8083 my_config.json

在package.json的dependencies中增加*"zeta-renderer": "latest"*

var renderer = require("zeta-renderer");

renderer({port:8083, configFilePath:"my_config.json"});
renderer.config; //返回配置

其中的选项:

  1. port: 端口号 8080;
  2. filesHome: 编译后的文件夹名 "public";
  3. dataFiles: 数据文件路径 [];
  4. extraHelpers: 自定义help文件路径 [];
  5. assetsPrefix: filesHome目录下的文件路径 void 0;
  6. user: 用户数据,用于注入_USER_ void 0;
  7. configFilePath: 根目录下配置文件 "renderer.json";
  8. indexView: 默认的页面view "index".

配置内容优先级

默认配置 < 调用参数/命令行 < 配置文件

helper

  1. ifCond
  2. size 返回数组的大小
  3. json 将对象以json格式返回
  4. mod 是否整除
  5. neither 两个非
  6. and 两个是
  7. gt 大于
  8. equals 相等
  9. add 两个数字相加
  10. of 参数一在数组二中
  11. formatDatelong格式的时间以YYYY-MM-DD HH:mm:ss格式返回
  12. formatPrice 将分为单位的金额以xx.xx格式返回
  13. assign 在上下文定义一个变量
  14. markdown 引入.md文件
  15. inject 引入.hbs文件