@flightdev/cms 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @flightdev/cms
|
|
2
2
|
|
|
3
3
|
Unified CMS adapters for Flight Framework. One API for Strapi, Contentful, Sanity, and more.
|
|
4
4
|
|
|
@@ -19,14 +19,14 @@ Unified CMS adapters for Flight Framework. One API for Strapi, Contentful, Sanit
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npm install @
|
|
22
|
+
npm install @flightdev/cms
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
import { createCMS } from '@
|
|
29
|
-
import { strapi } from '@
|
|
28
|
+
import { createCMS } from '@flightdev/cms';
|
|
29
|
+
import { strapi } from '@flightdev/cms/strapi';
|
|
30
30
|
|
|
31
31
|
const cms = createCMS(strapi({
|
|
32
32
|
url: process.env.STRAPI_URL,
|
|
@@ -51,7 +51,7 @@ const post = await cms.findOne('posts', {
|
|
|
51
51
|
### Strapi
|
|
52
52
|
|
|
53
53
|
```typescript
|
|
54
|
-
import { strapi } from '@
|
|
54
|
+
import { strapi } from '@flightdev/cms/strapi';
|
|
55
55
|
|
|
56
56
|
const adapter = strapi({
|
|
57
57
|
url: 'http://localhost:1337',
|
|
@@ -63,7 +63,7 @@ const adapter = strapi({
|
|
|
63
63
|
### Contentful
|
|
64
64
|
|
|
65
65
|
```typescript
|
|
66
|
-
import { contentful } from '@
|
|
66
|
+
import { contentful } from '@flightdev/cms/contentful';
|
|
67
67
|
|
|
68
68
|
const adapter = contentful({
|
|
69
69
|
spaceId: 'your-space-id',
|
|
@@ -77,7 +77,7 @@ const adapter = contentful({
|
|
|
77
77
|
### Sanity
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
|
-
import { sanity } from '@
|
|
80
|
+
import { sanity } from '@flightdev/cms/sanity';
|
|
81
81
|
|
|
82
82
|
const adapter = sanity({
|
|
83
83
|
projectId: 'your-project-id',
|
|
@@ -90,7 +90,7 @@ const adapter = sanity({
|
|
|
90
90
|
## React Integration
|
|
91
91
|
|
|
92
92
|
```tsx
|
|
93
|
-
import { CMSProvider, useCMSQuery, useCMSOne } from '@
|
|
93
|
+
import { CMSProvider, useCMSQuery, useCMSOne } from '@flightdev/cms/react';
|
|
94
94
|
|
|
95
95
|
// App
|
|
96
96
|
function App() {
|
|
@@ -135,7 +135,7 @@ function PostPage({ slug }) {
|
|
|
135
135
|
|
|
136
136
|
```vue
|
|
137
137
|
<script setup>
|
|
138
|
-
import { provideCMS, useCMSQuery } from '@
|
|
138
|
+
import { provideCMS, useCMSQuery } from '@flightdev/cms/vue';
|
|
139
139
|
|
|
140
140
|
// Provide CMS in root component
|
|
141
141
|
provideCMS(cms);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flightdev/cms",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Unified CMS adapters for Flight Framework - use any headless CMS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flight",
|
|
@@ -66,6 +66,12 @@
|
|
|
66
66
|
"optional": true
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
+
"homepage": "https://github.com/EliosLT/FlightDev",
|
|
70
|
+
"repository": {
|
|
71
|
+
"url": "https://github.com/EliosLT/FlightDev.git",
|
|
72
|
+
"directory": "packages/cms",
|
|
73
|
+
"type": "git"
|
|
74
|
+
},
|
|
69
75
|
"scripts": {
|
|
70
76
|
"build": "tsup",
|
|
71
77
|
"dev": "tsup --watch",
|