-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
191 additions
and
39 deletions.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
// generated by unplugin-vue-components | ||
// We suggest you to commit this file into source control | ||
// Read more: https://github.com/vuejs/vue-next/pull/3399 | ||
|
||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
ICarbonAppConnectivity: typeof import('~icons/carbon/app-connectivity')['default'] | ||
ICustomCarA: typeof import('~icons/custom/car-a')['default'] | ||
ICustomSteeringWheel: typeof import('~icons/custom/steering-wheel')['default'] | ||
IFaSolidDiceFive: typeof import('~icons/fa-solid/dice-five')['default'] | ||
IHeroiconsOutlineMenuAlt2: typeof import('~icons/heroicons-outline/menu-alt2')['default'] | ||
IIcTwotone23mp: typeof import('~icons/ic/twotone23mp')['default'] | ||
IIcTwotone24mp: typeof import('~icons/ic/twotone24mp')['default'] | ||
IInlineAsync: typeof import('~icons/inline/async')['default'] | ||
IInlineFoo: typeof import('~icons/inline/foo')['default'] | ||
ILogosVue: typeof import('~icons/logos/vue')['default'] | ||
'IMdi:cactus': typeof import('~icons/mdi/cactus')['default'] | ||
IMdiAccount: typeof import('~icons/mdi/account')['default'] | ||
IMdiDiceD12: typeof import('~icons/mdi/dice-d12')['default'] | ||
IMdiLightAlarm: typeof import('~icons/mdi-light/alarm')['default'] | ||
INotoV1FlagForFlagJapan: typeof import('~icons/noto-v1/flag-for-flag-japan')['default'] | ||
IRiApps2Line: typeof import('~icons/ri/apps2-line')['default'] | ||
ITwemoji1stPlaceMedal: typeof import('~icons/twemoji/1st-place-medal')['default'] | ||
} | ||
} | ||
|
||
export { } |
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,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
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 @@ | ||
export * from './dist/loaders' |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
export function camelize(str: string) { | ||
return str.replace(/-([a-z0-9])/g, g => g[1].toUpperCase()) | ||
} | ||
|
||
export function pascalize(str: string) { | ||
const camel = camelize(str) | ||
return camel[0].toUpperCase() + camel.slice(1) | ||
} | ||
|
||
export function camelToKebab(key: string) { | ||
const result = key | ||
.replace(/:/g, '-') | ||
.replace(/([A-Z])/g, ' $1') | ||
.trim() | ||
return result.split(/\s+/g).join('-').toLowerCase() | ||
} |
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,17 @@ | ||
import { existsSync, promises as fs } from 'fs' | ||
import { camelize, pascalize } from './core/utils' | ||
import { CustomIconLoader } from '.' | ||
|
||
export function FileSystemIconLoader(dir: string): CustomIconLoader { | ||
return (name) => { | ||
const pathes = [ | ||
`${dir}/${name}.svg`, | ||
`${dir}/${camelize(name)}.svg`, | ||
`${dir}/${pascalize(name)}.svg`, | ||
] | ||
for (const path of pathes) { | ||
if (existsSync(path)) | ||
return fs.readFile(path, 'utf-8') | ||
} | ||
} | ||
} |
Oops, something went wrong.