A tool for loading images in TypeScript projects efficiently.
To install assetloader
globally, run:
go install github.com/QBin-Studio/assetloader@latest
After installation, you can access assetloader
from your terminal:
assetloader
This will display usage instructions.
To generate a TypeScript index file for your images, use:
assetloader --dir=/path/to/images --prefix=IMG_PREFIX --output=index.ts
--dir
: Path to the directory containing your images.--prefix
: Prefix to use for generated image constants.--output
: Output TypeScript file.
For more details, refer to the documentation or run.