crex
Advanced tools
Comparing version 1.7.5 to 1.7.6
@@ -15,2 +15,4 @@ #!/usr/bin/env node | ||
const zipFileName = 'ce-import.zip'; | ||
try { | ||
@@ -74,3 +76,3 @@ auth = fs.readFileSync(process.cwd() + '/auth.json', 'utf-8'); | ||
var creds = program.env ? auth[program.env] : auth; | ||
var omit = program.omit ? program.omit : '**/node_modules/**'; | ||
var omit = program.omit ? program.omit : ['**/node_modules/**']; | ||
@@ -103,3 +105,3 @@ if (typeof creds === 'undefined') { | ||
if (program.compress) { | ||
name = 'ce-import.zip'; | ||
name = zipFileName; | ||
var output = fs.createWriteStream(name); | ||
@@ -121,6 +123,8 @@ var zip = archiver('zip'); | ||
const ignore = [...omit, `**/${zipFileName}`]; | ||
zip.glob(folder + '/**/*' , { | ||
cwd: (folder.charAt(0) === '/') ? folder : process.cwd(), | ||
dot: true, | ||
ignore: omit | ||
ignore | ||
}); | ||
@@ -157,3 +161,3 @@ }); | ||
fs.unlink('ce-import.zip', function(err){ | ||
fs.unlink(zipFileName, function(err){ | ||
if (err) return; | ||
@@ -160,0 +164,0 @@ }); |
{ | ||
"name": "crex", | ||
"version": "1.7.5", | ||
"version": "1.7.6", | ||
"description": "Creative Exchange SDK for Javascript", | ||
@@ -5,0 +5,0 @@ "author": "Mateusz Luczak <mateusz.luczak@outlook.com>", |
Sorry, the diff of this file is too big to display
2079239
48262