Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): implement type generation #62

Merged
merged 9 commits into from
Jan 7, 2025
Merged

Conversation

oktaysenkan
Copy link
Owner

@oktaysenkan oktaysenkan commented Jan 7, 2025

image

Overview

Monicon uses TypeScript to generate types for the icons. To enable TypeScript type definitions for your icons, add the following configuration to your tsconfig.json file:

{
  "include": [".monicon/*.d.ts"]
}

You can also use the typesFileName option to specify the name of the file to output the types to. If you want to disable the types file, you can set the generateTypes option to false.

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import monicon from "@monicon/vite";

export default defineConfig({
  plugins: [
    react(),
    monicon({
      typesFileName: "types",
      generateTypes: true,
    }),
  ],
});

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 6a3a299

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@monicon/icon-loader Minor
@monicon/core Minor
@monicon/esbuild Minor
@monicon/loader Minor
@monicon/metro Minor
@monicon/native Minor
@monicon/nuxt Minor
@monicon/qwik Minor
@monicon/react Minor
@monicon/rollup Minor
@monicon/rspack Minor
@monicon/svelte Minor
@monicon/typescript-config Minor
@monicon/vite Minor
@monicon/vue Minor
@monicon/webpack Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
monicon-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 9:29pm

@oktaysenkan oktaysenkan merged commit e002b74 into main Jan 7, 2025
2 of 3 checks passed
@github-actions github-actions bot mentioned this pull request Jan 7, 2025
@oktaysenkan oktaysenkan deleted the feat/type-generation branch January 16, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant