1.0.13 • Published 2 years ago

@ashushunov/create-img-component v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

create-img-component

A small util to create a preact component based on png image.

How to use:

    cd folder/with/img
    npx @ashushunov/create-img-component name-of-img.png

or for all files in a folder:

    cd folder/with/several-img
    npx @ashushunov/create-img-component

How to use:

    cd folder/with/img
    npx @ashushunov/create-img-component name-of-img.png

What it does:

  • creates a folder with name of the image;
  • converts the image to webp and avif;
  • copies all the images to the folder;
  • creates a component with picture tag with webp, avif and png sources;

The component has pros:

  • className
  • alt

Start dev example

    cd example
    node ../ image-name.png

or for both files

    cd example
    node ../ 
1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago