1.0.13 • Published 3 years ago

@ashushunov/create-img-component v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago