Releases: firefoxic/optimize
Releases · firefoxic/optimize
Release v5.0.0
Changed
- The separate commands
optimize faviconsandoptimize iconshave been removed. - The
optimize allcommand has been renamed tooptimize assets. - The
-h(--help) flag without specifying a command now only prints general brief help information. - The
-v(--version) flag in any of the commands now only displays the version and terminates execution. optimize assetscommand:- The
-h(--help) flag now only prints detailed help for theoptimize assetscommand. - The
-r(--remove-origin) flag is now enabled by default (use--no-rto prevent the removal of raster image source files). - The
-a(--add-origin-format) flag is no longer available. - The
-i(--input-directory) option is no longer available. - The
-o(--output-directory) option is no longer available. - The new
-s(--shared-directory) option is now available with a default value of./src/shared/. - Behavior:
- Raster and vector images (not icons) must now be located in the
<publicDirectory>/images/directory. - The metadata of all raster images from
<publicDirectory>/imagesis now stored in theimagesfield in the<sharedDirectory>/data.jsonfile, with the other fields in that file remaining unchanged. - Raster image metadata no longer contains paths and imports.
- The names of generated custom properties for icons are now lowercase with a hyphen as a word separator, consistent with the style of custom properties generated from design tokens.
- All generated favicons are now placed directly in
<publicDirectory>with names starting withfavicon. - If
manifest.webmanifestalready exists, its contents are now saved with only the array in theiconsfield replaced with the new one. - If the
nameanddescriptionfields are missing frommanifest.webmanifest, they will now be filled with the values of these fields from theprojectfield in the<sharedDirectory>/data.jsonfile, if they exist. - The
links.mdfile is now created in the<sharedDirectory>directory.
- Raster and vector images (not icons) must now be located in the
- The
optimize imagescommand:- The
-h(--help) flag now only prints detailed help for theoptimize imagescommand. - The default value of the
-i(--input-directory) option is now changed to./. - The default value of the
-f(--target-formats) option is now changed toavif. - The default value of the
-d(--origin-density) option is now changed to0. - The
-a(--add-origin-format) flag is no longer available. - The
-m(--add-meta-data) flag is no longer available. - The
-p(--public-directory) option is no longer available.
- The
Release v4.0.1
Fixed
- The paths in the metadata are correct again.
Release v4.0.0
Changed
- The repository and CLI command have been renamed to
optimize. - The
optimizecommand now works withpnpm. - Apple touch icons are no longer generated.
- Webp touch icons are no longer generated.
- The processing of a specific image will now be skipped if the originDensity specified does not equal the maxDensity value available for that image in the metadata file.
- The processing of a specific image will now be skipped if the target formats specified do not match those available in the metadata file for that image.
- The breakpoint suffix in raster image file names must now begin with
~instead of-. For example,cat-768.pngmust be renamed tocat~768.png. - The
-m(--add-meta-data) flag is now enabled by default. Use--no-m(--no-add-meta-data) to disable it. - The name of the JSON metadata file now has the suffix
.meta. - The name of the JS metadata file now has the suffix
.imports. - The JS metadata file now exports only an array with dynamic imports.
- The progress bar is now more compact, but also more informative.
- The minimum required
node.jsversion has been increased to22.18.0. This has reduced the number of dependencies.
Added
- The metadata files now include a
namefield with the image name without suffixes.
Fixed
- Repeated image optimization runs no longer create duplicates in the
sizesfield of the metadata file.
Release v3.0.1
Fixed
- The
maxDensityfield in metadata files when-max-density 1is specified now gets the correct value instead of the erroneousnull.
Release v3.0.0
Changed
- Full option names are now spelled out in the kebab-case.
- The
--target-formatoption now accepts a single value, but you can specify the option multiple times to pass multiple values. For example, the equivalent of the default:-f avif -f webp. - In files generated by the
--add-meta-dataoption, thesizesarray is now sorted from smaller breakpoint to larger. The size without a breakpoint is still placed at the end of the array.
Release v2.1.3
Fixed
- The progressbar now fills correctly with the
-aflag.
Release v2.1.2
Fixed
- Output directory and file names are now correctly generated when
./is specified in the-iflag. - Progressbar no longer erases error messages.
Release v2.1.1
Fixed
- The
imagescommand with the-rflag now removes the source file only if no errors occurred during its processing. - Error messages for the
imagescommand are now more readable. - The verbose and useless
imagescommand execution messages have been replaced by a compact and clear progressbar. - Source file extensions can now be in uppercase.
Release v2.1.0
Added
- The
--addMetaData(-m) flag is now also available for theiconscommand. Enabling it will create anindex.cssfile in the output directory, which contains registrations of custom properties with paths to icons. - The
--originDensity(-d) option now takes the value0. This works like the1value, but without adding the density suffix to the filename.
Release v2.0.0
Changed
- The
faviconscommand no longer depends on the following options:-i— the path to the directory with the files to be processed is now specified with the-poption;-o— new files are created in the same directory as the original files (i.e., the directory specified by the-poption);-r— the original favicon files are now always deleted after processing is complete.
- The
faviconscommand now places only thefavicon.ico,manifest.webmanifest, andLinks.mdfiles in the specified directory, with all other files being placed in thefaviconssubdirectory. This eliminates the need to manually move the listed files up one level. You only need to extract thelinktags code from theLinks.mdfile into your HTML layout and then delete theLinks.mdfile.
Added
- New CLI option
-p(--publicDirectory) for the favicons command, allowing you to specify a directory (publicby default) with static assets where the source SVG files for generating favicons are expected. - New CLI flag
-m(--addMetaData), enabling which when processing raster images additionally generates metadata files in JSON and JS formats.