beta.3 - TYPES are now being properly exported.
This commit is contained in:
parent
525f5d95ae
commit
424721bce7
5
index.ts
5
index.ts
|
@ -1,2 +1,5 @@
|
||||||
|
// FUNCTION EXPORTS
|
||||||
export { getGhostPosts, getGhostRecentPosts, getGhostFeaturedPosts, getGhostPostbySlug, getGhostPostsbyTag, getGhostTags, getGhostTagbySlug, getGhostAuthors, getGhostPages, getGhostPage, getGhostSettings } from './src/ghost';
|
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';
|
10
package.json
10
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@adammatthiesen/astro-ghostcms",
|
"name": "@adammatthiesen/astro-ghostcms",
|
||||||
"description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content",
|
"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>",
|
"author": "Adam Matthiesen <adam@matthiesen.xyz>",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -16,9 +16,12 @@
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts"
|
".": "./index.ts"
|
||||||
},
|
},
|
||||||
|
"main": "index.ts",
|
||||||
|
"types": "index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
"index.ts"
|
"index.ts",
|
||||||
|
"index.d.ts"
|
||||||
],
|
],
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"astro-component",
|
"astro-component",
|
||||||
|
@ -37,6 +40,5 @@
|
||||||
"@astrojs/check": "^0.3.4",
|
"@astrojs/check": "^0.3.4",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"axios": "^1.0.0"
|
"axios": "^1.0.0"
|
||||||
},
|
}
|
||||||
"main": "index.ts"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
// IMPORT Ghost Types
|
// 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 Ghost API Client
|
||||||
import { api } from './Content-API/api-client';
|
import { api } from './Content-API/api-client';
|
||||||
|
|
||||||
// SET Include params
|
// SET Include params
|
||||||
const include:ArrayOrValue<IncludeParam> = ['authors', 'tags'];
|
const include:ArrayOrValue<IncludeParam> = ['authors', 'tags'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue