From 49b9d09f6ff49d366233954ae1b65d262e381a31 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 10 Jun 2020 22:26:59 +0300 Subject: [PATCH] Move API modules from iconify package to core package --- .../modules/api-axios.ts => core/src/api/modules/axios.ts} | 4 ++-- .../modules/api-jsonp.ts => core/src/api/modules/jsonp.ts} | 6 +++--- packages/iconify/src/iconify.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename packages/{iconify/src/modules/api-axios.ts => core/src/api/modules/axios.ts} (96%) rename packages/{iconify/src/modules/api-jsonp.ts => core/src/api/modules/jsonp.ts} (96%) diff --git a/packages/iconify/src/modules/api-axios.ts b/packages/core/src/api/modules/axios.ts similarity index 96% rename from packages/iconify/src/modules/api-axios.ts rename to packages/core/src/api/modules/axios.ts index 0f64ef2..baccc5d 100644 --- a/packages/iconify/src/modules/api-axios.ts +++ b/packages/core/src/api/modules/axios.ts @@ -6,8 +6,8 @@ import { IconifyAPISendQuery, IconifyAPIModule, GetIconifyAPIModule, -} from '@iconify/core/lib/api/modules'; -import { GetAPIConfig } from '@iconify/core/lib/api/config'; +} from '../modules'; +import { GetAPIConfig } from '../config'; /** * Endpoint diff --git a/packages/iconify/src/modules/api-jsonp.ts b/packages/core/src/api/modules/jsonp.ts similarity index 96% rename from packages/iconify/src/modules/api-jsonp.ts rename to packages/core/src/api/modules/jsonp.ts index f578732..8869b1f 100644 --- a/packages/iconify/src/modules/api-jsonp.ts +++ b/packages/core/src/api/modules/jsonp.ts @@ -5,8 +5,8 @@ import { IconifyAPISendQuery, IconifyAPIModule, GetIconifyAPIModule, -} from '@iconify/core/lib/api/modules'; -import { GetAPIConfig } from '@iconify/core/lib/api/config'; +} from '../modules'; +import { GetAPIConfig } from '../config'; /** * Global @@ -193,7 +193,7 @@ export const getAPIModule: GetIconifyAPIModule = ( const cacheKey = provider + ':' + prefix; // Create callback prefix - const cbPrefix = prefix.split('-').shift().slice(0, 3); + const cbPrefix = prefix.split('-').shift()!.slice(0, 3); const global = getGlobal(); diff --git a/packages/iconify/src/iconify.ts b/packages/iconify/src/iconify.ts index e8b8701..4d9a2cf 100644 --- a/packages/iconify/src/iconify.ts +++ b/packages/iconify/src/iconify.ts @@ -57,7 +57,7 @@ import { getAPIConfig, GetAPIConfig, } from '@iconify/core/lib/api/config'; -import { getAPIModule } from './modules/api-jsonp'; +import { getAPIModule } from '@iconify/core/lib/api/modules/jsonp'; import { IconifyIconLoaderCallback, IconifyIconLoaderAbort,