New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pack-dir

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pack-dir

Pack/unpack specified directory with native current OS command line tools.

  • 0.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

PackDir

NPM Travis CI AppVeyor CI

Pack specified directory with native current OS command line tools.

Main purpose for this lib was to pack the Electron app.
So, by default, if specified path has a darwin in it's name, the directory will be packed as DMG under OS X.

Usage

Get the package via NPM: npm install pack-dir.

const Pack = require('pack-dir');

// Set custom DMG RegEx, default is `/darwin/`.
Pack.param('dmg', /osx/);

// Pack the directory
let zipPath = Pack.path('some/test/dir');
// Extract to directory
let extractedPath = Pack.extract(zipPath, 'some/destination');

// Async example
Pack.param('isSync', false);
let zipPath = Pack.path('some/test/dir', (error, stdout, stderr) => {
  // ...
});

Parameters

  • dmg boolean|RegEx, check to pack into DMG instead of ZIP.
  • dmgFormat string, the hdiutil -format parameter value (docs).
  • isSilent boolean, false, will write only Errors to console.
  • isSync boolean, true, synchronous packaging.
  • skipDirName boolean, true, don't create extra directory inside ZIP archive.
  • zipOutputMaxBuffer int, 1024 * 200.

Credits

Created by Annexare Studio. Feel free to use it as you need in your apps or send updates into this public repository. All code is under MIT license.

7-Zip

For Windows host 7-Zip standalone console app is used (~1MB, doesn't require installation). All license files are included with it, with respect to the author (Igor Pavlov).

Keywords

FAQs

Package last updated on 30 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc