Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation #19

Merged
merged 2 commits into from Mar 17, 2017
Merged

Better documentation #19

merged 2 commits into from Mar 17, 2017

Conversation

DavideMontersino
Copy link

I found the README not complete, it took a while to understand how to use the library.

This is what I could not immediately find:

  • What are the arguments of zip.file()?
  • How do I zip existing files?

I updated the readmeincluding

  1. A complete example: how to zip multiple files from the filesystem to the filesystem
  2. syntax highlight
  3. explanation about zip.file()

Cheers!

// the first argument is how you want the file to be named inside your zip,
// the second is the actual data:
zip.file('file1.txt', fs.readFileSync(path.join(__dirname, 'file1.txt')));
zip.file('file2.txt', fs.readFileSync(path.join(__dirname, 'file2.txt')));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I was looking for

@daraosn daraosn merged commit 6b617fe into daraosn:master Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants