Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bimgc

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bimgc - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

8

bin/index.js

@@ -11,3 +11,3 @@ #!/usr/bin/env node

.options({
size: {
sizes: {
type: 'array',

@@ -17,2 +17,3 @@ demandOption: false,

description: 'Array of sizes to generate',
alias: 's',
},

@@ -24,2 +25,3 @@ format: {

description: 'Formats to generate',
alias: 'f',
},

@@ -46,3 +48,3 @@ outputdir: {

const inputFileBase = path.basename(inputFile);
const sizes = args.size;
const sizes = args.sizes;
const formats = args.format;

@@ -114,5 +116,5 @@ const help = args.help;

} catch (error) {
console.error(`🚫 error`);
console.error(`🚫 Error:`, error);
process.exit(1);
}
})();

@@ -5,2 +5,4 @@ # Changelog

### [0.1.8](https://github.com/shinokada/bimgc/compare/v0.1.7...v0.1.8) (2023-02-05)
### [0.1.7](https://github.com/shinokada/bimgc/compare/v0.1.6...v0.1.7) (2023-02-05)

@@ -7,0 +9,0 @@

{
"name": "bimgc",
"version": "0.1.7",
"description": "A Node.js script that converts PNG and JPG images to AVIF and WebP format with various sizes and saves them in a specified output directory. The output images are named based on the input file and include information about their size and format.",
"version": "0.1.8",
"description": "A node.js script that converts PNG and JPG images to AVIF and WebP format with various sizes and saves them in a specified output directory. The output images are named based on the input file and include information about their size and format.",
"main": "bin/index.js",

@@ -6,0 +6,0 @@ "bin": {

# bimgc - Batch Image Converter
A Node.js script that converts PNG and JPG images to AVIF and WebP format with various sizes and saves them in a specified output directory. The output images are named based on the input file and include information about their size and format.
A CLI tool for converting PNG and JPG images to AVIF and WebP format with various sizes and saves them in a specified output directory. The output images are named based on the input file and include information about their size and format.
It is recommended to use this script in conjunction with [imgtaggen](https://imgtaggen.codewithshin.com/).
## Installation
```bash
npm i -g bimgc
bimgc --version
bimgc --help
cd path/to/your/project
```
## Usages
```bash
bimgc public/images/bimgc.png -o public/images
```
This will convert `public/images/bimgc.png` to the `public/images` directory. The following images will be created.
```txt
bimgc-100.avif bimgc-200.avif bimgc-400.avif bimgc-800.avif
bimgc-100.png bimgc-200.png bimgc-400.png bimgc-800.png
bimgc-100.webp bimgc-200.webp bimgc-400.webp bimgc-800.webp
```
## Size
The default output sizes are 100, 200, 400, and 800. To specify a different set of output sizes, use the `-s` or `--sizes` option.
```bash
bimgc public/images/bimgc.png -s 100 200 -o public/images
```
## Format
The default formats are avif and webp. To specify a different set of output format, use `-f` or `--format` option.
```bash
public/images/bimgc.png -o public/images -f avif
```
## Output directory
The default output directory is your working directory. To specify a different output directory, use `-o` or `--outputdir` option.
```bash
public/images/bimgc.png -s 100 200 -o public/images
```
## Use this with imgtaggen
[imgtaggen](https://imgtaggen.codewithshin.com/) is a CLI tool for generating a responsive image tag with support for AVIF and WebP formats. It will also calculate image ratio.
Use `bimgc` in conjunction with `imgtaggen`.
## PWA: Fast & Offline
This website can be downloaded and installed on your device for offline access as a Progressive Web App.
The [docs website]() can be downloaded and installed on your device for offline access as a Progressive Web App.
To install a PWA, look for the "Add to Home Screen" option in the browser's menu or settings. On most mobile devices, this option can be found by visiting the website, then selecting the "Options" or "Menu" button in the browser, and looking for the "Add to Home Screen" option. On some desktop browsers, right-click on the page and select "Install".

@@ -11,3 +11,3 @@ // Change this to your repository name

// users the old files!
const VERSION = 'version_01';
const VERSION = 'version_02';

@@ -14,0 +14,0 @@ // The files to make available for offline use. make sure to add

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc