Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

co-prepare-deployment-package

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-prepare-deployment-package - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

16

co-prepare-deployment-package.js

@@ -5,12 +5,10 @@ var fileSystem = require('fs')

// config = {
// packageName: 'my-super-depoloyment-pack.zip',
// outDir: 'deployDir',
// globs: ['my-file.txt', 'my-folder/**/*']
// }
function pack (config) {
var packageName = config.packageName || 'PACKAGE.zip'
var outDir = config.outDir || '/'
var outDirFull = path.join(__dirname, outDir, packageName)
var output = fileSystem.createWriteStream(__dirname + outDir + packageName)
if (!config.outDir) {
console.log('outDir missing!')
return
}
var fullOutDir = path.join(config.outDir, packageName)
var output = fileSystem.createWriteStream(fullOutDir)
var archive = archiver('zip')

@@ -22,3 +20,3 @@

console.log('Package has been created at:')
console.log(outDirFull)
console.log(fullOutDir)
console.log('Package size: ' + archive.pointer() + ' total bytes')

@@ -25,0 +23,0 @@ })

@@ -0,5 +1,6 @@

var path = require('path')
module.exports = {
packageName: 'DEPLOY_PACKAGE.zip',
outDir: '/',
outDir: path.join(__dirname, ''),
globs: ['example/suitcase/muffler.txt', 'example/suitcase/zip-bag/**/*']
}
{
"name": "co-prepare-deployment-package",
"version": "1.0.1",
"version": "1.0.2",
"description": "Zip a bunch of files and folders for deployment",

@@ -5,0 +5,0 @@ "main": "co-prepare-deployment-package.js",

## co-prepare-deployment-package
### How to use
```javascript
var path = require('path')
require('co-prepare-deployment-package').pack({
packageName: 'my-super-depoloyment-pack.zip',
outDir: path.join(__dirname, 'deployDir'),
globs: ['my-file.txt', 'my-folder/**/*']
})
```
Run example:

@@ -4,0 +14,0 @@ - Go to package dir `cd co-prepare-deployment-package`

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