diff --git a/src/Types/ghost.ts b/index.d.ts similarity index 100% rename from src/Types/ghost.ts rename to index.d.ts diff --git a/index.ts b/index.ts index de5558c0..697e9cf1 100644 --- a/index.ts +++ b/index.ts @@ -1,2 +1,5 @@ +// FUNCTION EXPORTS export { getGhostPosts, getGhostRecentPosts, getGhostFeaturedPosts, getGhostPostbySlug, getGhostPostsbyTag, getGhostTags, getGhostTagbySlug, getGhostAuthors, getGhostPages, getGhostPage, getGhostSettings } from './src/ghost'; -export { api } from './src/Content-API/api-client'; \ No newline at end of file + +// TYPE EXPORTS +export type { PostOrPage, ArrayOrValue, Author, Authors, BrowseFunction, CodeInjection, Excerpt, Facebook, FieldParam, FilterParam, FormatParam, GhostAPI, GhostContentAPIOptions, GhostData, GhostError, Identification, IncludeParam, LimitParam, Metadata, Nullable, OrderParam, PageParam, Pagination, Params, PostsOrPages, ReadFunction, Settings, SettingsResponse, SocialMedia, Tag, TagVisibility, Tags, Twitter } from './index.d'; \ No newline at end of file diff --git a/package.json b/package.json index 9a138581..3b3b004b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@adammatthiesen/astro-ghostcms", "description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content", - "version": "0.0.1-beta.2", + "version": "0.0.1-beta.3", "author": "Adam Matthiesen ", "type": "module", "license": "MIT", @@ -16,9 +16,12 @@ "exports": { ".": "./index.ts" }, + "main": "index.ts", + "types": "index.d.ts", "files": [ "src", - "index.ts" + "index.ts", + "index.d.ts" ], "keywords": [ "astro-component", @@ -37,6 +40,5 @@ "@astrojs/check": "^0.3.4", "typescript": "^5.3.3", "axios": "^1.0.0" - }, - "main": "index.ts" + } } diff --git a/src/ghost.ts b/src/ghost.ts index 8ac87bdc..6de8a6dc 100644 --- a/src/ghost.ts +++ b/src/ghost.ts @@ -1,9 +1,8 @@ // IMPORT Ghost Types -import type { PostOrPage, PostsOrPages, Authors, Tag, Tags, ArrayOrValue, IncludeParam, LimitParam, Settings, Nullable } from './Types/ghost'; +import type { PostOrPage, PostsOrPages, Authors, Tag, Tags, ArrayOrValue, IncludeParam, LimitParam, Settings, Nullable } from '../index.d'; // IMPORT Ghost API Client import { api } from './Content-API/api-client'; - // SET Include params const include:ArrayOrValue = ['authors', 'tags'];