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

simplite

v0.0.2

Published

browser and node server html template

Downloads

1

Readme

Simplite

========

Simplite是一个超轻量的js模板引擎,支持node服务器端和浏览器端。

  • 特点:
    • 1:代码量少,学习成本低;
    • 2:默认jsp语法标签方式,熟悉jsp的朋友可以直接按照jsp的语法书写模板;
    • 3:使用原生js语法进行逻辑处理,只要熟悉js语法即可直接上手,没有学习成本。
    • 4:支持原生js的所有语法作为代码逻辑片段,支持宽泛的书写格式。
    • 5:支持重定义模板语言的标签符,默认的逻辑标签为<%和%>,默认的属性标签为<%=和%>。
    • 6:支持嵌套子模板,子模板默认(没有传递数据参数)是共享父模板数据,可以通过传参设置子模板使用的数据集。
    • 7:支持动态导入模板与嵌入多个模板,只要导入的模板不是循环依赖的模板都能正常处理。
    • 8:支持子模板使用Simplite.dataKey指定的字段访问传递过来的数据全集,默认值为"_this",对于数组、数字这样的数据集来说,使用Simplite.dataKey很容易拿到数据。
    • 9:支持面向对象方式使用模板和纯静态函数方式来手动组织模板处理过程。
    • 10:支持除了访问父模板数据外,还可以提供方法作用域内任何数据为数据集,比如在全局有个arr,那么可以include(tmplt, arr)来指定。
    • 11:支持对数据进行过滤处理,使用关键字filter(name, datas...)方式进行调用,其中name为Simplite.addFilter(name, fun)的name注册的方法
  • 使用说明: http://www.cnblogs.com/centre/p/4299198.html