kt3k / packup

📦 Zero-config web application packager for Deno
https://packup.deno.dev/
MIT License
327 stars 18 forks source link

feat: add image import #33

Closed tjosepo closed 2 years ago

tjosepo commented 2 years ago

Hi! I'm interested in Packup and would love to see this project grow, so I made this PR.

Changes:

Example:

<html>
  <head>
  </head>
  <body>
    <h1>Hey!</h1>
-   <img src="images/my_image.png">
+   <img src="index.e64db08d87e7ea59f8a01df1dcbb9de5.png">
</body></html>

A new image file is created. The orignal image src will be replaced by the new image filename.

Todos:

Feedback is welcomed 🙂

tjosepo commented 2 years ago

By the way, the image I used for testing is the Deno logo.

tjosepo commented 2 years ago

Just realized I forgot about the srcset attribute and the <picture> element. I'm considering adding them in a separate PR.

kt3k commented 2 years ago

published as 0.1.11