Socket
Socket
Sign inDemoInstall

gulp-nocache

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-nocache

Version static assets. Clear cache of browser when you publish your webapp.


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 14 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc