Skip to content

Commit

Permalink
refactor: ionic resolver strict components (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
reslear committed Jul 18, 2023
1 parent 729d992 commit 416f2c6
Showing 1 changed file with 94 additions and 3 deletions.
97 changes: 94 additions & 3 deletions src/core/resolvers/ionic.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,107 @@
import type { ComponentResolver } from '../../types'

/**

Check failure on line 3 in src/core/resolvers/ionic.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
* source: https://github.com/nuxt-modules/ionic/blob/main/src/imports.ts
* @author @danielroe
*/
export const IonicBuiltInComponents = [
'IonAccordion',
'IonAccordionGroup',
'IonActionSheet',
'IonAlert',
'IonApp',
'IonAvatar',
'IonBackButton',
'IonBackdrop',
'IonBadge',
'IonBreadcrumb',
'IonBreadcrumbs',
'IonButton',
'IonButtons',
'IonCard',
'IonCardContent',
'IonCardHeader',
'IonCardSubtitle',
'IonCardTitle',
'IonCheckbox',
'IonChip',
'IonCol',
'IonContent',
'IonDatetime',
'IonDatetimeButton',
'IonFab',
'IonFabButton',
'IonFabList',
'IonFooter',
'IonGrid',
'IonHeader',
'IonIcon',
'IonImg',
'IonInfiniteScroll',
'IonInfiniteScrollContent',
'IonInput',
'IonItem',
'IonItemDivider',
'IonItemGroup',
'IonItemOption',
'IonItemOptions',
'IonItemSliding',
'IonLabel',
'IonList',
'IonListHeader',
'IonLoading',
'IonMenu',
'IonMenuButton',
'IonMenuToggle',
'IonModal',
'IonNav',
'IonNavLink',
'IonNote',
'IonPage',
'IonPicker',
'IonPopover',
'IonProgressBar',
'IonRadio',
'IonRadioGroup',
'IonRange',
'IonRefresher',
'IonRefresherContent',
'IonReorder',
'IonReorderGroup',
'IonRippleEffect',
'IonRouterOutlet',
'IonRow',
'IonSearchbar',
'IonSegment',
'IonSegmentButton',
'IonSelect',
'IonSelectOption',
'IonSkeletonText',
'IonSpinner',
'IonSplitPane',
'IonTabBar',
'IonTabButton',
'IonTabs',
'IonText',
'IonTextarea',
'IonThumbnail',
'IonTitle',
'IonToast',
'IonToggle',
'IonToolbar',
]

/**
* Resolver for ionic framework
*
* @author @mathsgod
* @link https://github.com/mathsgod
* @author @mathsgod @reslear
* @link https://ionicframework.com/
*/
export function IonicResolver(): ComponentResolver {
return {
type: 'component',
resolve: (name: string) => {
if (name.startsWith('Ion')) {
if (IonicBuiltInComponents.includes(name)) {
return {
name,
from: '@ionic/vue',
Expand Down

0 comments on commit 416f2c6

Please sign in to comment.