Skip to content

Commit

Permalink
More Typescript re-write work
Browse files Browse the repository at this point in the history
Renamed many files
Refactored tests
  • Loading branch information
Kevin Gravier committed Jan 18, 2018
1 parent e60efde commit 405640e
Show file tree
Hide file tree
Showing 88 changed files with 1,344 additions and 616 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
7. Added `coalesce` option to all commands
8. Added orientation to `info()`
9. Changed `resize()` to not auto-set height from width
10. Added `getImageMagickVersion()`
11. Rewrote tests to be more clear


2.2.0 - 10-01-2018
------------------
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ any of the parameters defined on `IBaseOptions`. For example, to prevent EasyIma
command.

Every command must have a `src` parameter. If you do not specify a `dst`, then a random file will be created. Be sure to clean up randomly created files by
either moving them to permanent storage, or deleting them. Some command have other required options.
either moving them to permanent storage, or deleting them. Some commands have other required options.

The examples below only specify the required arguments. See the [Docs](https://mrkmg.github.io/node-easyimage/index.html) for all available options for each
command.
The examples below only specify some of the available arguments. See the [Docs](https://mrkmg.github.io/node-easyimage/index.html) for all available options for
each command.

### Convert

Expand Down Expand Up @@ -179,7 +179,7 @@ ImageMagick.
```
import {getImageMagickVersion} from "easyimage";
const version = getImageMagickVersion();
const version = await getImageMagickVersion();
```

## Error Handling
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/baddestinationerror.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Errors/BadDestinationError.ts#L14">Errors/BadDestinationError.ts:14</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/errors/BadDestinationError.ts#L14">errors/BadDestinationError.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="baddestinationerror.html" class="tsd-signature-type">BadDestinationError</a></h4>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/imagemagickmissingerror.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Errors/ImageMagickMissingError.ts#L14">Errors/ImageMagickMissingError.ts:14</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/errors/ImageMagickMissingError.ts#L14">errors/ImageMagickMissingError.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="imagemagickmissingerror.html" class="tsd-signature-type">ImageMagickMissingError</a></h4>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/missingextensionerror.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Errors/MissingExtensionError.ts#L14">Errors/MissingExtensionError.ts:14</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/errors/MissingExtensionError.ts#L14">errors/MissingExtensionError.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/missingoptionserror.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Errors/MissingOptionsError.ts#L14">Errors/MissingOptionsError.ts:14</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/errors/MissingOptionsError.ts#L14">errors/MissingOptionsError.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/unsupportederror.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Errors/UnsupportedError.ts#L14">Errors/UnsupportedError.ts:14</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/errors/UnsupportedError.ts#L14">errors/UnsupportedError.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
26 changes: 13 additions & 13 deletions docs/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -1005,9 +1005,9 @@ <h2 id="installation">Installation</h2>
any of the parameters defined on <code>IBaseOptions</code>. For example, to prevent EasyImage from auto-orientating your image, you can pass <code>autoOrient: false</code> on any
command.</p>
<p>Every command must have a <code>src</code> parameter. If you do not specify a <code>dst</code>, then a random file will be created. Be sure to clean up randomly created files by
either moving them to permanent storage, or deleting them. Some command have other required options.</p>
<p>The examples below only specify the required arguments. See the <a href="https://mrkmg.github.io/node-easyimage/index.html">Docs</a> for all available options for each
command.</p>
either moving them to permanent storage, or deleting them. Some commands have other required options.</p>
<p>The examples below only specify some of the available arguments. See the <a href="https://mrkmg.github.io/node-easyimage/index.html">Docs</a> for all available options for
each command.</p>
<h3 id="convert">Convert</h3>
<p>The <a href="http://localhost:63342/node-easyimage/docs/globals.html#convert">convert()</a> command can convert an image file from one type to another.</p>
<pre><code><span class="hljs-keyword">import</span> {convert} <span class="hljs-keyword">from</span> <span class="hljs-string">"easyimage"</span>;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ <h3 id="info">Info</h3>
ImageMagick.</p>
<pre><code><span class="hljs-keyword">import</span> {getImageMagickVersion} <span class="hljs-keyword">from</span> <span class="hljs-string">"easyimage"</span>;

<span class="hljs-keyword">const</span> version = getImageMagickVersion();
<span class="hljs-keyword">const</span> version = <span class="hljs-keyword">await</span> getImageMagickVersion();
</code></pre><h2 id="error-handling">Error Handling</h2>
<p>There are 5 different types of errors that can be thrown.</p>
<ul>
Expand Down Expand Up @@ -1191,7 +1191,7 @@ <h3>convert</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/convert.ts#L27">Commands/convert.ts:27</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/convert.ts#L27">commands/convert.ts:27</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1219,7 +1219,7 @@ <h3>crop</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/crop.ts#L28">Commands/crop.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/crop.ts#L28">commands/crop.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1247,7 +1247,7 @@ <h3>execute</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/ImageMagick.ts#L30">ImageMagick.ts:30</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/execute.ts#L30">execute.ts:30</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1281,7 +1281,7 @@ <h3>get<wbr>Image<wbr>Magick<wbr>Version</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/ImageMagick.ts#L51">ImageMagick.ts:51</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/execute.ts#L51">execute.ts:51</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1312,7 +1312,7 @@ <h3>info</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/info.ts#L26">Commands/info.ts:26</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/info.ts#L26">commands/info.ts:26</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1343,7 +1343,7 @@ <h3>rescrop</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/rescrop.ts#L29">Commands/rescrop.ts:29</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/rescrop.ts#L29">commands/rescrop.ts:29</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1371,7 +1371,7 @@ <h3>resize</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/resize.ts#L28">Commands/resize.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/resize.ts#L28">commands/resize.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1399,7 +1399,7 @@ <h3>rotate</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/rotate.ts#L28">Commands/rotate.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/rotate.ts#L28">commands/rotate.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1427,7 +1427,7 @@ <h3>thumbnail</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/thumbnail.ts#L28">Commands/thumbnail.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/thumbnail.ts#L28">commands/thumbnail.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
26 changes: 13 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1005,9 +1005,9 @@ <h2 id="installation">Installation</h2>
any of the parameters defined on <code>IBaseOptions</code>. For example, to prevent EasyImage from auto-orientating your image, you can pass <code>autoOrient: false</code> on any
command.</p>
<p>Every command must have a <code>src</code> parameter. If you do not specify a <code>dst</code>, then a random file will be created. Be sure to clean up randomly created files by
either moving them to permanent storage, or deleting them. Some command have other required options.</p>
<p>The examples below only specify the required arguments. See the <a href="https://mrkmg.github.io/node-easyimage/index.html">Docs</a> for all available options for each
command.</p>
either moving them to permanent storage, or deleting them. Some commands have other required options.</p>
<p>The examples below only specify some of the available arguments. See the <a href="https://mrkmg.github.io/node-easyimage/index.html">Docs</a> for all available options for
each command.</p>
<h3 id="convert">Convert</h3>
<p>The <a href="http://localhost:63342/node-easyimage/docs/globals.html#convert">convert()</a> command can convert an image file from one type to another.</p>
<pre><code><span class="hljs-keyword">import</span> {convert} <span class="hljs-keyword">from</span> <span class="hljs-string">"easyimage"</span>;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ <h3 id="info">Info</h3>
ImageMagick.</p>
<pre><code><span class="hljs-keyword">import</span> {getImageMagickVersion} <span class="hljs-keyword">from</span> <span class="hljs-string">"easyimage"</span>;

<span class="hljs-keyword">const</span> version = getImageMagickVersion();
<span class="hljs-keyword">const</span> version = <span class="hljs-keyword">await</span> getImageMagickVersion();
</code></pre><h2 id="error-handling">Error Handling</h2>
<p>There are 5 different types of errors that can be thrown.</p>
<ul>
Expand Down Expand Up @@ -1192,7 +1192,7 @@ <h3>convert</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/convert.ts#L27">Commands/convert.ts:27</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/convert.ts#L27">commands/convert.ts:27</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1220,7 +1220,7 @@ <h3>crop</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/crop.ts#L28">Commands/crop.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/crop.ts#L28">commands/crop.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1248,7 +1248,7 @@ <h3>execute</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/ImageMagick.ts#L30">ImageMagick.ts:30</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/execute.ts#L30">execute.ts:30</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1282,7 +1282,7 @@ <h3>get<wbr>Image<wbr>Magick<wbr>Version</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/ImageMagick.ts#L51">ImageMagick.ts:51</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/execute.ts#L51">execute.ts:51</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1313,7 +1313,7 @@ <h3>info</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/info.ts#L26">Commands/info.ts:26</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/info.ts#L26">commands/info.ts:26</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1344,7 +1344,7 @@ <h3>rescrop</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/rescrop.ts#L29">Commands/rescrop.ts:29</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/rescrop.ts#L29">commands/rescrop.ts:29</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1372,7 +1372,7 @@ <h3>resize</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/resize.ts#L28">Commands/resize.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/resize.ts#L28">commands/resize.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1400,7 +1400,7 @@ <h3>rotate</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/rotate.ts#L28">Commands/rotate.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/rotate.ts#L28">commands/rotate.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1428,7 +1428,7 @@ <h3>thumbnail</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/Commands/thumbnail.ts#L28">Commands/thumbnail.ts:28</a></li>
<li>Defined in <a href="https://github.com/mrkmg/node-easyimage/blob/master/src/commands/thumbnail.ts#L28">commands/thumbnail.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
Loading

0 comments on commit 405640e

Please sign in to comment.