-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from oktaysenkan/feat/type-generation
feat(core): implement type generation
- Loading branch information
Showing
6 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"@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 | ||
--- | ||
|
||
implement type generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# TypeScript | ||
|
||
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: | ||
|
||
```json filename="tsconfig.json" copy {2} | ||
{ | ||
"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`. | ||
|
||
```ts filename="apps/vite-react/vite.config.ts" copy {9,10} | ||
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, | ||
}), | ||
], | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters