beta.3 - TYPES are now being properly exported.

This commit is contained in:
Adam Matthiesen 2024-01-14 05:12:31 -08:00
parent 525f5d95ae
commit 424721bce7
4 changed files with 11 additions and 7 deletions

View File

View File

@ -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';
// 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';

View File

@ -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 <adam@matthiesen.xyz>",
"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"
}
}

View File

@ -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<IncludeParam> = ['authors', 'tags'];