@travetto/image 3.0.2 → 3.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/package.json +3 -3
- package/src/convert.ts +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!-- This file was generated by @travetto/doc and should not be modified directly -->
|
|
2
|
-
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/image/DOC.
|
|
2
|
+
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/image/DOC.tsx and execute "npx trv doc" to rebuild -->
|
|
3
3
|
# Image
|
|
4
|
+
|
|
4
5
|
## Image support, resizing, and optimization
|
|
5
6
|
|
|
6
7
|
**Install: @travetto/image**
|
|
@@ -12,7 +13,7 @@ npm install @travetto/image
|
|
|
12
13
|
yarn add @travetto/image
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
This module provides functionality for image resizing, and png optimization. This is primarily meant to be used in conjunction with other modules, like the [Asset](https://github.com/travetto/travetto/tree/main/module/asset#readme "Modular library for storing and retrieving binary assets") module or the [Email Templating](https://github.com/travetto/travetto/tree/main/module/email-template#readme "Email templating module") module. It can also be invoked directly as needed (as it can be very handy for batch processing images on the command line).
|
|
16
|
+
This module provides functionality for image resizing, and png optimization. This is primarily meant to be used in conjunction with other modules, like the [Asset](https://github.com/travetto/travetto/tree/main/module/asset#readme "Modular library for storing and retrieving binary assets") module or the [Email Templating](https://github.com/travetto/travetto/tree/main/module/email-template#readme "Email templating module") module. It can also be invoked directly as needed (as it can be very handy for batch processing images on the command line).
|
|
16
17
|
|
|
17
18
|
The utility's primary structure revolves around the [CommandOperation](https://github.com/travetto/travetto/tree/main/module/command/src/command.ts#L11) from the [Command](https://github.com/travetto/travetto/tree/main/module/command#readme "Support for executing complex commands at runtime.") module. The [CommandOperation](https://github.com/travetto/travetto/tree/main/module/command/src/command.ts#L11) allows for declaration of a local executable, and a fall-back docker container (mainly meant for development). The [ImageConverter](https://github.com/travetto/travetto/tree/main/module/image/src/convert.ts#L31) utilizes [ImageMagick](https://imagemagick.org/index.php), [pngquant](https://pngquant.org/), and [Jpegoptim](https://github.com/tjko/jpegoptim) as the backing for image resizing and png compression, respectively.
|
|
18
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/image",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-rc.0",
|
|
4
4
|
"description": "Image support, resizing, and optimization",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"images",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"directory": "module/image"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@travetto/base": "^3.0.
|
|
27
|
-
"@travetto/command": "^3.0.
|
|
26
|
+
"@travetto/base": "^3.1.0-rc.0",
|
|
27
|
+
"@travetto/command": "^3.1.0-rc.0"
|
|
28
28
|
},
|
|
29
29
|
"travetto": {
|
|
30
30
|
"displayName": "Image"
|
package/src/convert.ts
CHANGED
|
@@ -34,7 +34,7 @@ export class ImageConverter {
|
|
|
34
34
|
* Resize/conversion util
|
|
35
35
|
*/
|
|
36
36
|
static CONVERTER = new CommandOperation({
|
|
37
|
-
containerImage: '
|
|
37
|
+
containerImage: 'jameskyburz/graphicsmagick-alpine:v1.0.0',
|
|
38
38
|
localCheck: ['gm', ['-version']]
|
|
39
39
|
});
|
|
40
40
|
|