Skip to content

Commit b5418db

Browse files
authored
Update readme.md
1 parent cac0d18 commit b5418db

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

readme.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
# gulp-rev [![Build Status](https://travis-ci.org/sindresorhus/gulp-rev.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-rev) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Gitter](https://badges.gitter.im/join_chat.svg)](https://gitter.im/sindresorhus/gulp-rev)
1+
# gulp-rev [![Build Status](https://travis-ci.com/sindresorhus/gulp-rev.svg?branch=master)](https://travis-ci.com/github/sindresorhus/gulp-rev) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
22

33
> Static asset revisioning by appending content hash to filenames
44
> `unicorn.css``unicorn-d41d8cd98f.css`
55
6-
**This project is feature complete.**
6+
**This project is feature complete. PRs adding new features will not be accepted.**
77

88
Make sure to set the files to [never expire](http://developer.yahoo.com/performance/rules.html#expires) for this to have an effect.
99

10-
1110
## Install
1211

1312
```
1413
$ npm install --save-dev gulp-rev
1514
```
1615

17-
1816
## Usage
1917

2018
```js
@@ -28,7 +26,6 @@ exports.default = () => (
2826
);
2927
```
3028

31-
3229
## API
3330

3431
### rev()
@@ -37,8 +34,8 @@ exports.default = () => (
3734

3835
#### path
3936

40-
Type: `string`<br>
41-
Default: `rev-manifest.json`
37+
Type: `string`\
38+
Default: `'rev-manifest.json'`
4239

4340
Manifest file path.
4441

@@ -48,44 +45,41 @@ Type: `object`
4845

4946
##### base
5047

51-
Type: `string`<br>
48+
Type: `string`\
5249
Default: `process.cwd()`
5350

5451
Override the `base` of the manifest file.
5552

5653
##### cwd
5754

58-
Type: `string`<br>
55+
Type: `string`\
5956
Default: `process.cwd()`
6057

6158
Override the current working directory of the manifest file.
6259

6360
##### merge
6461

65-
Type: `boolean`<br>
62+
Type: `boolean`\
6663
Default: `false`
6764

6865
Merge existing manifest file.
6966

7067
##### transformer
7168

72-
Type: `object`<br>
69+
Type: `object`\
7370
Default: `JSON`
7471

7572
An object with `parse` and `stringify` methods. This can be used to provide a
7673
custom transformer instead of the default `JSON` for the manifest file.
7774

78-
7975
### Original path
8076

8177
Original file paths are stored at `file.revOrigPath`. This could come in handy for things like rewriting references to the assets.
8278

83-
8479
### Asset hash
8580

8681
The hash of each rev'd file is stored at `file.revHash`. You can use this for customizing the file renaming, or for building different manifest formats.
8782

88-
8983
### Asset manifest
9084

9185
```js
@@ -136,7 +130,6 @@ exports.default = () => (
136130

137131
You can optionally call `rev.manifest('manifest.json')` to give it a different path or filename.
138132

139-
140133
## Sourcemaps and `gulp-concat`
141134

142135
Because of the way `gulp-concat` handles file paths, you may need to set `cwd` and `path` manually on your `gulp-concat` instance to get everything to work correctly:
@@ -157,7 +150,6 @@ exports.default = () => (
157150
);
158151
```
159152

160-
161153
## Different hash for unchanged files
162154

163155
Since the order of streams are not guaranteed, some plugins such as `gulp-concat` can cause the final file's content and hash to change. To avoid generating a new hash for unchanged source files, you can:
@@ -166,7 +158,6 @@ Since the order of streams are not guaranteed, some plugins such as `gulp-concat
166158
- Filter unchanged files with [gulp-unchanged](https://github.com/sindresorhus/gulp-changed)
167159
- Read more about [incremental builds](https://github.com/gulpjs/gulp#incremental-builds)
168160

169-
170161
## Streaming
171162

172163
This plugin does not support streaming. If you have files from a streaming source, such as Browserify, you should use [`gulp-buffer`](https://github.com/jeromew/gulp-buffer) before `gulp-rev` in your pipeline:
@@ -188,12 +179,10 @@ exports.default = () => (
188179
);
189180
```
190181

191-
192182
## Integration
193183

194184
For more info on how to integrate `gulp-rev` into your app, have a look at the [integration guide](integration.md).
195185

196-
197186
## Use gulp-rev in combination with one or more of
198187

199188
It may be useful - and necessary - to use `gulp-rev` with other packages to complete the task.

0 commit comments

Comments
 (0)