diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66ada19..63d6cac 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 2d7d22d..86d353c 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 2edeb2b..cb00505 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: npm run prettier:check + - run: npx prettier --check . diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 0126ee5..cc10d01 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 8a6766e..19fbcd3 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,19 +17,21 @@ 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: @@ -58,14 +60,12 @@ 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 af128ce..f77c6d9 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 16b1cc5..8dc822b 100644 --- a/app/globals.css +++ b/app/globals.css @@ -157,7 +157,9 @@ 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 bd0c391..a5ef193 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 new file mode 100644 index 0000000..b72a2b0 --- /dev/null +++ b/test.md @@ -0,0 +1 @@ +this is a test file and will be deleted later