imagemagick-cli
Advanced tools
Comparing version
@@ -5,2 +5,12 @@ # Change Log | ||
# [0.4.0](https://github.com/dwmkerr/node-imagemagick-cli/compare/v0.3.0...v0.4.0) (2019-04-18) | ||
### Features | ||
* add debug package ([b29874c](https://github.com/dwmkerr/node-imagemagick-cli/commit/b29874c)) | ||
* add support for node-debug ([d5070ed](https://github.com/dwmkerr/node-imagemagick-cli/commit/d5070ed)) | ||
<a name="0.3.0"></a> | ||
@@ -7,0 +17,0 @@ # [0.3.0](https://github.com/dwmkerr/node-imagemagick-cli/compare/v0.2.1...v0.3.0) (2018-06-28) |
{ | ||
"name": "imagemagick-cli", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Access the ImageMagick CLI tools from Node. Cross-platform, with support for ImageMagick 6 and 7.", | ||
@@ -30,12 +30,14 @@ "main": "./src/index.js", | ||
"devDependencies": { | ||
"chai": "^4.1.2", | ||
"eslint": "^5.0.0", | ||
"eslint-config-airbnb-base": "^13.0.0", | ||
"eslint-plugin-import": "^2.13.0", | ||
"mocha": "^5.0.0", | ||
"nyc": "^12.0.1", | ||
"sinon": "^6.0.0", | ||
"standard-version": "^4.4.0" | ||
"chai": "^4.2.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-plugin-import": "^2.17.2", | ||
"mocha": "^6.1.3", | ||
"nyc": "^14.0.0", | ||
"sinon": "^7.3.2", | ||
"standard-version": "^5.0.2" | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"debug": "^4.1.1" | ||
} | ||
} |
# node-imagemagick-cli | ||
[](https://circleci.com/gh/dwmkerr/node-imagemagick-cli) [](https://ci.appveyor.com/project/dwmkerr/node-imagemagick-cli) [](https://codecov.io/gh/dwmkerr/node-imagemagick-cli) [](https://david-dm.org/dwmkerr/node-imagemagick-cli) [](https://david-dm.org/dwmkerr/node-imagemagick-cli?type=dev) [](https://greenkeeper.io/) | ||
[](https://badge.fury.io/js/imagemagick-cli) [](https://circleci.com/gh/dwmkerr/node-imagemagick-cli) [](https://ci.appveyor.com/project/dwmkerr/node-imagemagick-cli) [](https://codecov.io/gh/dwmkerr/node-imagemagick-cli) [](https://david-dm.org/dwmkerr/node-imagemagick-cli) [](https://david-dm.org/dwmkerr/node-imagemagick-cli?type=dev) [](https://greenkeeper.io/) | ||
Access the ImageMagick CLI tools from Node. Cross-platform, with support for ImageMagick 6 and 7. | ||
- [Introduction](#introduction) | ||
- [Compatibility](#compatibility) | ||
- [Coding](#coding) | ||
- [License](#license) | ||
<!-- vim-markdown-toc GFM --> | ||
* [Introduction](#introduction) | ||
* [Compatibility](#compatibility) | ||
* [API](#api) | ||
* [Debugging](#debugging) | ||
* [Prior Art / Design Goals](#prior-art--design-goals) | ||
* [Coding](#coding) | ||
* [Creating a Release](#creating-a-release) | ||
* [License](#license) | ||
<!-- vim-markdown-toc --> | ||
## Introduction | ||
@@ -16,3 +25,3 @@ | ||
It is *safe* because it correctly deals with the [Windows convert issue](http://www.imagemagick.org/Usage/windows/#convert_issue). It is *platform indepdent* because you don't have to worry about how it deals with the issue. | ||
It is *safe* because it correctly deals with the [Windows convert issue](http://www.imagemagick.org/Usage/windows/#convert_issue). It is *platform independent* because you don't have to worry about how it deals with the issue. | ||
@@ -71,2 +80,10 @@ Install with npm: | ||
## Debugging | ||
This library uses the [`node-debug`](https://github.com/visionmedia/debug) module. To see low-level debugging information when using this library, set `imagemagick-cli` as part of the `DEBUG` environment variable: | ||
```bash | ||
DEBUG=imagemagick-cli node ./my-script.js | ||
``` | ||
## Prior Art / Design Goals | ||
@@ -79,3 +96,3 @@ | ||
- https://github.com/rsms/node-imagemagick | ||
- https://github.com/yourdeveloper/node-imagemagick (which is the active fork of the avove) | ||
- https://github.com/yourdeveloper/node-imagemagick (which is the active fork of the above) | ||
- https://github.com/elad/node-imagemagick-native | ||
@@ -93,8 +110,8 @@ | ||
| Command | Usage | | ||
|---------|-------| | ||
| `npm test` | Runs the unit tests. | | ||
| `npm run test:debug` | Runs the tests in a debugger. Combine with `.only` and `debugger` for ease of debugging. | | ||
| `npm run cov` | Runs the tests, writing coverage reports to `./artifacts/coverage`. | | ||
| `npm run lint` | Lint the code, using [airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb). | | ||
| Command | Usage | | ||
|----------------------|----------------------------------------------------------------------------------------------------------------| | ||
| `npm test` | Runs the unit tests. | | ||
| `npm run test:debug` | Runs the tests in a debugger. Combine with `.only` and `debugger` for ease of debugging. | | ||
| `npm run cov` | Runs the tests, writing coverage reports to `./artifacts/coverage`. | | ||
| `npm run lint` | Lint the code, using [airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb). | | ||
@@ -101,0 +118,0 @@ ### Creating a Release |
const childProcess = require('child_process'); | ||
const debug = require('debug')('imagemagick-cli'); | ||
const deconstructCommand = require('./deconstruct-command'); | ||
@@ -40,2 +41,4 @@ const pickCli = require('./pick-cli'); | ||
const reconstructedCommand = `"${mappedCli}" ${parameters}`; | ||
debug(`Preparing to execute: ${reconstructedCommand}`); | ||
childProcess.exec(reconstructedCommand, (err, stdout, stderr) => { | ||
@@ -42,0 +45,0 @@ if (err) { |
23796
6.56%109
1.87%125
15.74%1
Infinity%+ Added
+ Added
+ Added