From d7c2f0ba18a7c2f678b385c2ffe28904fab27ac4 Mon Sep 17 00:00:00 2001 From: RoachxD Date: Sat, 12 Aug 2023 04:46:17 +0300 Subject: [PATCH] feat: add `index.ts` to `components` and update main `index.ts` - Created `index.ts` file for `components`. - Updated main `index.ts` in order to reflect the above addition. - Sorted imports inside main `index.ts`. --- src/components/index.ts | 4 ++++ src/index.ts | 21 ++++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 src/components/index.ts diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 0000000..0dcf642 --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,4 @@ +export * from './DateTime'; +export * from './I18nProvider'; +export * from './Numeric'; +export * from './Text'; diff --git a/src/index.ts b/src/index.ts index 5edc897..cd27675 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,22 +1,13 @@ +import { createI18n as create, defineMessages } from 'i18n-mini'; +import type { I18nOptions, I18nPresets } from 'i18n-mini'; import { createStore } from 'solid-js/store'; import { template, insert } from 'solid-js/web'; -import { createI18n as create } from 'i18n-mini'; -import type { I18nOptions } from 'i18n-mini'; import type { I18n } from './types'; -export { defineMessages } from 'i18n-mini'; -export type { I18nPresets } from 'i18n-mini'; - -export { I18nProvider } from './components/I18nProvider'; -export { Text } from './components/Text'; -export { Numeric } from './components/Numeric'; -export { DateTime } from './components/DateTime'; -export { useI18n } from './context'; - -export type { TextProps } from './components/Text'; -export type { NumericProps } from './components/Numeric'; -export type { DateTimeProps } from './components/DateTime'; -export type { I18n } from './types'; +export { defineMessages }; +export type { I18n, I18nOptions, I18nPresets }; +export * from './components'; +export * from './context'; function formatTag(tag: string, child: string | string[] | undefined) { const el = template(`<${tag}>`, 0);