resize-image-cli
Advanced tools
Comparing version 1.0.0 to 1.0.1
16
app.js
@@ -15,3 +15,3 @@ #!/usr/bin/env node | ||
.version(package.version) | ||
.usage('[ -d destinationFolder ] [ -k SedasdeEEW1231asd213 ] -s sourceFolder ') | ||
.usage(' -d destinationFolder -s sourceFolder [-w width] [-h height]') | ||
.option('-s, --source <source-directory-path>', 'mention the source directory path.') | ||
@@ -36,4 +36,5 @@ .option('-d, --destination <destination-directory-path>', 'mention destination directory path.') | ||
if (option.sourceDir) { | ||
if(!option.width && !option.height){ | ||
console.log('Invalid Command\nPlease pass at least one args out of [-w / -h]'); | ||
}else if (option.sourceDir) { | ||
var sourceStat = fs.lstatSync(option.sourceDir); | ||
@@ -43,3 +44,3 @@ if(sourceStat.isDirectory()){ | ||
if(!option.destinationDir){ | ||
option.destinationDir = path.join(option.sourceDir, 'resize'); | ||
option.destinationDir = path.join(option.sourceDir, 'resize-image'); | ||
} | ||
@@ -60,4 +61,6 @@ mkpath.sync(option.destinationDir); | ||
if(err){ | ||
console.log('Error: ' + imgLink); | ||
callback(null, 'Error: ' + imgLink); | ||
}else{ | ||
console.log('Success: ' + imgLink); | ||
callback(null, 'Success: ' + imgLink); | ||
@@ -71,8 +74,9 @@ } | ||
console.log('\nError in Resize: ', err); | ||
}else { | ||
console.log('\n-- Image Resize Task Completed --\n'); | ||
} | ||
console.log('\n-- Image Resize completed --\n', data.join('\n')); | ||
}) | ||
} | ||
}else{ | ||
console.log('please mention the source destination.'); | ||
console.log('Invalid Command\nRun Command: resize-image --help \nFor More Details'); | ||
} | ||
@@ -79,0 +83,0 @@ |
{ | ||
"name": "resize-image-cli", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -9,6 +9,25 @@ "main": "app.js", | ||
}, | ||
"author": "", | ||
"bin": { | ||
"resize-image": "./app.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kashishgupta1990/resize-image-cli" | ||
}, | ||
"author": { | ||
"name": "Kashish Gupta", | ||
"email": "kashishguptatech@gmail.com", | ||
"url": "http://github.com/kashishgupta/" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/kashishgupta1990/resize-image-cli/issues" | ||
}, | ||
"keywords": [ | ||
"resize image", | ||
"resize jpg", | ||
"resize png", | ||
"png resize", | ||
"jpg resize" | ||
], | ||
"homepage": "https://github.com/kashishgupta1990/resize-image-cli#readme", | ||
"license": "ISC", | ||
@@ -15,0 +34,0 @@ "dependencies": { |
# resize-image-cli | ||
Command line tool which resize the .png and .jpg images. It uses `imagemagic` software to resize your images. | ||
Command line tool which resize the .png and .jpg images. | ||
# prerequisite software | ||
It uses `imagemagic` software to resize your images. | ||
- Install `brew` | ||
- Install `imagemagic` | ||
## Module Usage | ||
@@ -14,10 +19,14 @@ | ||
``` | ||
Usage: shrink-pic [ -d destinationFolder ] [ -k SedasdeEEW1231asd213 ] -s sourceFolder | ||
Usage: resize-image -d destinationFolder -s sourceFolder [-w width] [-h height] | ||
Options: | ||
-V, --version output the version number | ||
-s, --source <source-directory-path> mention the source directory path. | ||
-d, --destination <destination-directory-path> mention destination directory path. | ||
-w, --width <width> mention required width. | ||
-h, --height <height> mention required height. | ||
-h, --help output usage information. | ||
Options: | ||
-s, --source <source-directory-path> mention the source directory path. | ||
-d, --destination <destination-directory-path> mention destination directory path. | ||
-d, --width <width> mention required width. | ||
-d, --height <height> mention required height. | ||
# For Bugs / Features request please visit the following links:- | ||
- https://github.com/kashishgupta1990/resize-image-cli/issues |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5546
92
1
1
31
1