diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63d6cac..66ada19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "npm" + cache: 'npm' - run: npm install - run: npm run build diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 86d353c..2d7d22d 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -14,6 +14,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "npm" + cache: 'npm' - run: npm install - run: npm run lint diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index cb00505..2edeb2b 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -14,6 +14,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "npm" + cache: 'npm' - run: npm install - - run: npx prettier --check . + - run: npm run prettier:check diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index cc10d01..0126ee5 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -14,6 +14,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "npm" + cache: 'npm' - run: npm install - run: npm run type-check diff --git a/README.md b/README.md index 19fbcd3..8a6766e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ + # 🖼️ Image to SVG Converter A simple web app that lets users upload any image (PNG/JPG) and instantly convert it into an **SVG** file. -Users can **preview**, **copy the SVG code**, or **download the file** to use anywhere. +Users can **preview**, **copy the SVG code**, or **download the file** to use anywhere. --- ## ✨ Features - - 🚀 Upload images (PNG, JPG, JPEG) - 🔄 Convert raster images into scalable vector graphics (SVG) - 👀 Live preview of the generated SVG @@ -17,21 +17,19 @@ Users can **preview**, **copy the SVG code**, or **download the file** to use an --- ## 🛠️ Tech Stack - -- **Frontend:** React / Next.js -- **Vectorization:** [ImageTracer.js](https://github.com/jankovicsandras/imagetracerjs) -- **Styling:** TailwindCSS (or your chosen framework) +- **Frontend:** React / Next.js +- **Vectorization:** [ImageTracer.js](https://github.com/jankovicsandras/imagetracerjs) +- **Styling:** TailwindCSS (or your chosen framework) --- ## 📦 Installation Clone the repository: - ```bash git clone https://github.com/shitanshukumar607/imgToSvg.git cd imgToSvg -``` +```` Install dependencies: @@ -60,12 +58,14 @@ Open [http://localhost:3000](http://localhost:3000) to view the app in the brows ## 📸 Screenshots + + ## 🔮 Future Improvements -- ✏️ Basic SVG editor (resize, recolor, simplify paths) -- 🎨 Presets (outline only, reduced colors, full color) -- 📂 Support batch uploads -- 🤖 AI-assisted vectorization for complex images +* ✏️ Basic SVG editor (resize, recolor, simplify paths) +* 🎨 Presets (outline only, reduced colors, full color) +* 📂 Support batch uploads +* 🤖 AI-assisted vectorization for complex images --- @@ -79,4 +79,4 @@ Contributions are welcome! 4. Push branch (`git push origin feature-name`) 5. Create a Pull Request ---- +--- \ No newline at end of file diff --git a/app/api/upload/route.ts b/app/api/upload/route.ts index f77c6d9..af128ce 100644 --- a/app/api/upload/route.ts +++ b/app/api/upload/route.ts @@ -48,13 +48,13 @@ export async function POST(req: Request) { resolve(result); }); uploadStream.end(buffer); - }, + } ); const svgString = await cloudinaryToSVG(cloudinaryResponse.secure_url); return NextResponse.json( { url: cloudinaryResponse.secure_url, svg: svgString }, - { status: 201 }, + { status: 201 } ); } diff --git a/app/globals.css b/app/globals.css index 8dc822b..16b1cc5 100644 --- a/app/globals.css +++ b/app/globals.css @@ -157,9 +157,7 @@ border: 2px solid transparent; /* creates padding */ background-clip: padding-box; box-shadow: var(--sb-glow); - transition: - background-color 150ms ease, - transform 150ms ease; + transition: background-color 150ms ease, transform 150ms ease; } *::-webkit-scrollbar-thumb:hover { diff --git a/lib/utils.ts b/lib/utils.ts index a5ef193..bd0c391 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -1,6 +1,6 @@ -import { clsx, type ClassValue } from "clsx"; -import { twMerge } from "tailwind-merge"; +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); + return twMerge(clsx(inputs)) } diff --git a/test.md b/test.md deleted file mode 100644 index b72a2b0..0000000 --- a/test.md +++ /dev/null @@ -1 +0,0 @@ -this is a test file and will be deleted later