@dovenv/media
🔑 Installation
bash
npm install @dovenv/media
bash
pnpm install @dovenv/media
bash
yarn add @dovenv/media
bash
bun add @dovenv/media
bash
deno add @dovenv/media
Features
- Image Minification: Optimize your images
- Terminal GIF Creation: Create GIFs from your terminal
- Code Image Generation: Turn your code into beautiful images
- QR Code Generation: Generate QR codes for your projects
📈 Usage
Minify
js
import { defineConfig } from '@dovenv/core'
import mnediaPlugin from '@dovenv/media'
export default defineConfig( mnediaPlugin( {
min : {
'example-images' : {
input : [ 'media/*.png'],
output : './public',
opts : { png: true },
},
'example-gifs' : {
input : [ 'media/*.gif' ],
output : './public',
opts : { gif: { optimizationLevel: 3 } },
},
},
}))
bash
dovenv media min
Generate Code Images
js
import { defineConfig } from '@dovenv/core'
import mnediaPlugin from '@dovenv/media'
export default defineConfig( mnediaPlugin( {
codeimage : {
'example-path' : {
input : 'src/types.ts',
flags : [ '--interactive' ],
},
'example-code-text' : {
input : `import { defineConfig } from '@dovenv/core'\nexport default defineConfig({/** config */})`,
flags : [ '--interactive' ],
},
'example-url' : {
input : `https://raw.githubusercontent.com/pigeonposse/binarium/refs/heads/main/.dovenv/main.js`,
flags : [ '--interactive' ],
},
},
}))
bash
dovenv media codeimage
Generate Terminal gifs
js
import { defineConfig } from '@dovenv/core'
import mnediaPlugin from '@dovenv/media'
export default defineConfig( mnediaPlugin( {
termgif : { test : {
configPath : 'terminal-config.yml',
output : './public',
} },
}))
bash
dovenv media termgif
Generate QR codes
bash
dovenv media qr -i 'https://dovenv.pigeonposse.com'