{"id":18338454,"url":"https://github.com/ismail-elkorchi/dir-archiver","last_synced_at":"2025-06-12T23:35:50.901Z","repository":{"id":37880887,"uuid":"262992135","full_name":"Ismail-elkorchi/dir-archiver","owner":"Ismail-elkorchi","description":"Compress a whole directory (including subdirectories) into a zip file, with options to exclude specific files, or directories.","archived":false,"fork":false,"pushed_at":"2024-05-30T04:04:45.000Z","size":215,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-25T01:11:52.957Z","etag":null,"topics":["archive","archiver","compression","directory","folder","nodejs","npm","zip"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ismail-elkorchi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-11T09:05:33.000Z","updated_at":"2023-12-12T14:32:12.000Z","dependencies_parsed_at":"2024-06-18T18:41:38.271Z","dependency_job_id":"301050ff-9c9c-4610-a128-88d7de001ba0","html_url":"https://github.com/Ismail-elkorchi/dir-archiver","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":0.08108108108108103,"last_synced_commit":"e42c64584d9ebfff8ce5d3bf5029c6c35171875d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Ismail-elkorchi/dir-archiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ismail-elkorchi%2Fdir-archiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ismail-elkorchi%2Fdir-archiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ismail-elkorchi%2Fdir-archiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ismail-elkorchi%2Fdir-archiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ismail-elkorchi","download_url":"https://codeload.github.com/Ismail-elkorchi/dir-archiver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ismail-elkorchi%2Fdir-archiver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259549986,"owners_count":22875192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","archiver","compression","directory","folder","nodejs","npm","zip"],"created_at":"2024-11-05T20:14:11.958Z","updated_at":"2025-06-12T23:35:50.864Z","avatar_url":"https://github.com/Ismail-elkorchi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm][npm-image]][npm-url] [![license][license-image]][license-url]\n[![changelog][changelog-image]][changelog-url]\n\n# Dir Archiver\nCompress a whole directory (including subdirectories) into a zip file, with options to exclude specific files, or directories.\n\n# Installation\n\n```sh\n$ npm install dir-archiver\n```\n\n# Usage\n\n## API\n\n```javascript\n// Require modules.\nvar DirArchiver = require('dir-archiver');\n\n// Create an array with the files and directories to exclude.\nconst excludes = ['directory_name', 'file.extension'];\n\n/**\n * Create a dir-archiver object. \n * @param {string} directoryPath - The path of the folder to archive.\n * @param {string} zipPath - The path of the zip file to create.\n * @param {Boolean} includeBaseDirectory - Includes a base directory at the root of the archive.\n * For example, if the root folder of your project is named \"your-project\", setting\n * includeBaseDirectory to true will create an archive that includes this base directory.\n * If this option is set to false the archive created will unzip its content to\n * the current directory.\n * @param {array} excludes - A list with the names of the files and folders to exclude.\n*/\nvar archive = new DirArchiver('path/to/directory', 'path/to/desination/zipfile.zip', true, excludes);\n\n// Create the zip file.\narchive.createZip();\n```\n## Command Line Interface\n\n```sh\nUsage: dir-archiver --src \u003cpath-to-directory\u003e --dest \u003cpath-to-file\u003e.zip --includebasedir true|false --exclude folder-name file-name.extention\n\nOptions:\n  --src             The path of the folder to archive.                            [string][required]\n  --dest            The path of the zip file to create.                           [string][required]\n  --includebasedir  Includes a base directory at the root of the archive.\n                    For example, if the root folder of your project is named\n                    \"your-project\", setting this option to true will create\n                    an archive that includes this base directory.\n                    If this option is set to false the archive created will\n                    unzip its content to the current directory.                               [bool]\n  --exclude         A list with the names of the files and folders to exclude.               [array]\n```\n\n\n\n[changelog-image]: https://img.shields.io/badge/changelog-md-blue.svg?style=flat-square\n[changelog-url]: CHANGELOG.md\n[license-image]: https://img.shields.io/npm/l/dir-archiver.svg?style=flat-square\n[license-url]: LICENSE\n[npm-image]: https://img.shields.io/npm/v/dir-archiver.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/dir-archiver\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismail-elkorchi%2Fdir-archiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismail-elkorchi%2Fdir-archiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismail-elkorchi%2Fdir-archiver/lists"}