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

itag

v0.0.2

Published

Template

Downloads

4

Readme

# HTML 静态文件局部模板批量更新工具

banner

工具介绍

iTag 是一个简单易用的 HTML 静态文件局部模板批量更新工具,它通过注释的方式给 HTML 添加类似类似 css 的import语句语句的功能。

由于采用注释+工具自动替换的方式实现,有如下好处:

  1. 无需服务器与 js 支持
  2. 静态页面可反复被替换
  3. 注释直观易于理解

工具适用于 web 设计师或者 web 重构工程师。

include 语句

编写页面的时候,在需要动态更新的地方使用特殊注释包裹即可,例如:

 <!--[include './public/header.html']-->
    <div id="header">
        <ul class="nav">
            <li><a href="./index.html">Home</a></li>
            <li><a href="./news.html">News</a></li>
            <li><a href="./about.html">about</a></li>
        </ul>
    </div>
 <!--[/include]-->

安装工具

一、安装 NodeJS

iTag 采用 NodeJS 开发,所以首先需要下载安装 NodeJS

二、安装 iTag

在控制台运行:

npm install itag -g

运行工具

iTag 安装完毕后,系统会增加一个itag的命令,使用方式为:

itag [模板目录]

其中模板目录是可选的。

运行演示例子

下载程序包后,test 目录有一些演示的页面,例如切换到 test 目录并运行工具:

cd /Users/tangbin/Documents/github/iTag/test
itag