0.1.0 • Published 8 years ago

gulp-nocache v0.1.0

Weekly downloads
31
License
-
Repository
github
Last release
8 years ago

gulp-nocache

重命名所有静态资源,并替换相应的引用路径,用于解决web上线后浏览器缓存静态资源的问题。Web-NoCache

Install

npm install gulp-nocache

Usage

gulpfile.js示例

Input

./web
├── edit.png
├── index.html
├── index.js
├── main.css
└── main.js

Output

./build
├── edit.bf460a.png
├── index.0060a9.js
├── index.html
├── main.01cb6e.css
└── main.9968bc.js

index.html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>test web</title>
    <link rel="stylesheet" type="text/css" href="main.01cb6e.css">
</head>
<body>
<h1>TEST</h1>
<script type="text/javascript" src="main.9968bc.js"></script>
<script type="text/javascript" src="/index.0060a9.js"></script>
</body>
</html>

#API

##getMap

返回处理前后文件路径对应关系的map

##setMap(value)

设置处理前后文件路径对应关系的map

0.1.0

8 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago