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

gulp-pre-link

v2.3.4

Published

replace link html with it's content

Downloads

9

Readme

gulp-pre-link

Install

$ npm install --save-dev gulp-pre-link

Usage

widget/nav.html

<div class="nav">
	<ul>
		<li tag="0"><a href="index.html">首 页<br><span>HOME</span></a></li>
		<li tag="140"><a href="index.html">新闻公告<br><span>NEWS</span></a></li>
		<li tag="280"><a href="###">数据中心<br><span>DATA</span></a></li>
		<li tag="420"><a href="index.html">视频图集<br><span>VIDEO</span></a></li>
		<li tag="560"><a href="index.html">参赛球队<br><span>TEAM</span></a></li>
		<li tag="700"><a href="index.html">商务合作<br><span>COOPERATION</span></a></li>
	</ul>
	<div class="mark"></div>
	</li>
</div>

index.html

<div class="header">
	<div class="wrapper">
		<div class="topbar">
			<a class="logo" href="###"></a>
			<div class="login_status"><a class="p_center" href="###">个人中心</a> <a href="###">登陆</a> <a href="###">注册</a></div>
		</div>
		<link rel="import" href="static/widget/nav.html">
	</div>
</div>

result:

<div class="header">
	<div class="wrapper">
		<div class="topbar">
			<a class="logo" href="###"></a>
			<div class="login_status"><a class="p_center" href="###">个人中心</a> <a href="###">登陆</a> <a href="###">注册</a></div>
		</div>
		<div class="nav">
			<ul>
				<li tag="0"><a href="index.html">首 页<br><span>HOME</span></a></li>
				<li tag="140"><a href="index.html">新闻公告<br><span>NEWS</span></a></li>
				<li tag="280"><a href="###">数据中心<br><span>DATA</span></a></li>
				<li tag="420"><a href="index.html">视频图集<br><span>VIDEO</span></a></li>
				<li tag="560"><a href="index.html">参赛球队<br><span>TEAM</span></a></li>
				<li tag="700"><a href="index.html">商务合作<br><span>COOPERATION</span></a></li>
			</ul>
			<div class="mark"></div>
			</li>
		</div>
	</div>
</div>
var baseF="F:/code";//baseF="../code"
gulp.task('html', function() {
  var preLink = require('gulp-pre-link');
	return   gulp.src(config.htmlSrc)
	.pipe(preLink({baseUrl:baseF}))
	.pipe(gulp.dest(config.htmlDec));
});
  • 2.3.4
  • 2.3.2
  • 2.3.0
  • 2.2.0
    • add new parameter baseUrl if there is no this parameter,the path is based on the same with gulpfile.js
    • 新增参数 baseUrl 如果没有该参数则默认与gulpfile.js同级的相对路径
  • 2.0.0
    • deal with link more than one fix bug that can only import one link label,
    • 修复上一版本一次只能引入一个的bug
  • 1.0.0
    • Initial release