# gulp-css-assets-hash

> 为css中引用的图片资源增加hash后缀

Latest version **1.0.5** (published 2016-11-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-css-assets-hash
pnpm add gulp-css-assets-hash
yarn add gulp-css-assets-hash
bun add gulp-css-assets-hash
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-11-23 |
| First published | 2016-08-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lianer |
| Maintainers | lianer |
| Keywords | gulp, css, assets, hash, version |

## Links

- npm: https://www.npmjs.com/package/gulp-css-assets-hash
- Repository: https://github.com/lianer/gulp-css-assets-hash
- Homepage: https://github.com/lianer/gulp-css-assets-hash#readme
- Issues: https://github.com/lianer/gulp-css-assets-hash/issues
- npm.io page: https://npm.io/package/gulp-css-assets-hash

## Dependencies (2)

- [urijs](https://npm.io/package/urijs.md) ^1.18.1
- [through2](https://npm.io/package/through2.md) ^2.0.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2016-11-23
- 1.0.4 — 2016-11-04
- 1.0.3 — 2016-11-04
- 1.0.2 — 2016-11-04
- 1.0.1 — 2016-08-28
- 1.0.0 — 2016-08-26

## README

## Feature
为css中引用的png,jpg,gif图片路径增加hash，hash只有在图片修改后才会变化。
```css
background-image: url("./a.jpg");
=>
background-image: url("./a.jpg?_=f7a915c");
```

## Install
```bash
npm install gulp-css-assets-hash
```

## Options
`ignoreWarn`

忽略找不到图片的警告，默认为 false

## Example
```js
var gulp = require('gulp');
var hash = require('gulp-css-assets-hash');

gulp.task('default', function () {
	gulp.src('src/a.css')
		.pipe(hash())
		.pipe(gulp.dest('dist'));
})
```

---
_Source: https://npm.io/package/gulp-css-assets-hash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
