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

etpl2to3

v1.0.0

Published

Convert ETpl syntax from 2 to 3.

Downloads

10

Readme

etpl2to3

Build Status

etpl2to3 是一个将 ETpl 2 模板语法转换成 ETpl 3 的工具。

ETpl 是一个灵活、具有强大复用能力的高性能的模板引擎,适用于WEB前端应用中视图的生成,特别是SPA(Single Page APP)类型的应用。

安装

$ sudo npm install -g etpl2to3

使用

直接输入 etpl2to3 可以看到详细的帮助信息。

$ etpl2to3

  Usage: etpl2to3 <input file/directory> [options]

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -o, --output <output>    Output file or directory
    -e, --extname <extname>  Tpl file extname, use when input is directory. Default ".tpl.html"
    --override               Override when output file exists

通过 etpl2to3 可以转换一个模板文件,也可以通过指定扩展名,批量转换一个目录下的所有模板文件。

转换一个文件

$ etpl2to3 tplfile -o newtplfile

转换一个文件 (如果-o文件存在时,覆盖它)

$ etpl2to3 tplfile -o newtplfile --override

转换一个文件,直接覆盖当前文件

指定输入文件输出文件相同时,将直接覆盖当前文件。不推荐这种方式。如果你的文件没有使用版本管理,千万不要这样做。

$ etpl2to3 src-directory -o src-directory --override

转换一个目录

$ etpl2to3 src-directory -o new-src-directory

转换一个目录 (如果-o目录存在时,覆盖它)

$ etpl2to3 src-directory -o new-src-directory --override

转换一个目录,直接覆盖当前文件

指定输入目录输出目录相同时,将直接覆盖当前文件。不推荐这种方式。如果你的文件没有使用版本管理,千万不要这样做。

$ etpl2to3 src-directory -o src-directory --override