Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

quangphuchuynh95/joli-zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple zip files or folder with Nodejs

Requirements

  • MacOS or Linux computer

Installation

  1. Install zip command on your computer
    • Ubuntu: run sudo apt-get install zip
    • CentOS: run sudo yum install zip
    • MacOS: do nothing because zip is installed on MacOS by default
  2. Run yarn add joli-zip or npm i joli-zip

Usage

Typescript

import { zip } from 'joli-zip';
import { join } from 'path';

zip(
  [
    'file_1.pdf',
    'file_2.pdf',
    // (List of files and folder to zip)
  ],
  'test.zip',  // (output file name)
  {
    password: 'any password', // (zip password)
    workingDirectory: __dirname, // (Folder contains files to zip)
  }
)

Javascript

const { zip } = require('joli-zip');
const { join } = require('path')

zip(
  [
    'file_1.pdf',
    'file_2.pdf',
    // (List of files and folder to zip)
  ],
  'test.zip',  // (output file name)
  {
    password: 'any password', // (zip password)
    workingDirectory: __dirname, // (Folder contains files to zip)
  }
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published