docs: Add kwatch to showcase (#6281)

* Add kwatch to showcase

* remove trailing whitespace in description

* fix preview extension

* resize

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Abdelrahman Ahmed 2022-01-07 08:53:45 +02:00 committed by GitHub
parent 06a8cdcb0f
commit 32a24e4edd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -10,10 +10,13 @@ import sharp from 'sharp';
import fs from 'fs/promises';
import path from 'path';
const images = (
const allImages = (
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
).filter((file) => ['.png', 'jpg', '.jpeg'].includes(path.extname(file)));
const [,,...selectedImages] = process.argv;
const images = selectedImages.length > 0 ? selectedImages : allImages;
await Promise.all(
images.map(async (img) => {
const imgPath = new URL(