Skip to content

Commit 4d25ea6

Browse files
committedJun 5, 2015
update README [ci skip]
1 parent 2aae944 commit 4d25ea6

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed
 

‎README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,23 @@ a streaming interface for archive generation
1010
npm install archiver --save
1111
```
1212

13-
You can also use `npm install https://github.com/archiverjs/node-archiver/archive/master.tar.gz` to test upcoming versions.
13+
## Usage
1414

15-
## Archiver
16-
17-
#### create(format, options)
15+
```js
16+
var archiver = require('archiver');
17+
var archive = archiver.create('zip', {}); // or archiver('zip', {});
18+
```
1819

19-
Creates an Archiver instance based on the format (zip, tar, etc) passed. Parameters can be passed directly to `Archiver` constructor for convenience.
20+
## API
2021

21-
### Instance Methods
22+
#### Transform
2223

2324
Inherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) methods.
2425

26+
#### create(format, options)
27+
28+
Creates an Archiver instance based on the format (zip, tar, etc) passed. Parameters can be passed directly to `Archiver` constructor for convenience.
29+
2530
#### abort()
2631

2732
Aborts the archiving process, taking a best-effort approach, by:
@@ -96,6 +101,10 @@ Finalizes the instance and prevents further appending to the archive structure (
96101

97102
Returns the current byte length emitted by archiver. Use this in your end callback to log generated size.
98103

104+
#### use(plugin)
105+
106+
Add a plugin to the middleware stack. Currently this is designed for passing the module to use (replaces registerFormat/setFormat/setModule)
107+
99108
## Events
100109

101110
Inherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) events.

0 commit comments

Comments
 (0)
Please sign in to comment.