Skip to content

Commit

Permalink
Update readme and add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelreichor committed Nov 16, 2024
1 parent f6ef26b commit 1915ea2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
8 changes: 8 additions & 0 deletions .changeset/great-ads-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'vue-craftcms': patch
---

Add better support for pages to CraftNotImplemented component.
Add support for entryTypes to mapping and according option to install method.
Update js-craftcms-api package.
Update Readme.
48 changes: 19 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,43 @@

<p align="center">
<a href="https://npmjs.com/package/vue-craftcms">
<img src="https://img.shields.io/npm/v/vue-craftcms/latest.svg?style=flat-square" alt="Vue craftcms latest version" />
<img src="https://img.shields.io/npm/v/vue-craftcms?color=blue" alt="Vue craftcms latest version" />
</a>
<a href="https://npmjs.com/package/vue-craftcms" rel="nofollow">
<img src="https://img.shields.io/npm/dt/vue-craftcms.svg?style=flat-square" alt="Vue craftcms downloads">
<img src="https://img.shields.io/npm/d18m/vue-craftcms?color=blue" alt="Vue craftcms downloads">
</a>
<a href="https://npmjs.com/package/vue-craftcms" rel="nofollow">
<img src="https://img.shields.io/github/license/samuelreichor/vue-craftcms?color=blue" alt="Vue craftcms license">
</a>
</p>

> [!WARNING]
> This npm package is still in production and important features may change.
## Installation

Install `vue-craftcms`
## Features

```bash
npm install -D vue-craftcms
# yarn add -D vue-craftcms
```
- Easily build urls for the Craft Query API plugin directly from Vue.
- Connect your data directly with your Vue components, to speed up development.
- Avoid overfetching by using a custom function in the query builder to select only the fields you require.
- Json Transformer are in place to prettify the response.
- Query addresses, assets, entries and users.

Register the plugin on your application (usually in main.ts) and add the baseUrl to your craft cms backend
## Requirements

```typescript
import { CraftCms } from '@vue-craftcms';
import { createApp } from 'vue';
import App from './App.vue';
This plugin requires Vue 3 and the [Craft Query API](https://github.com/samuelreichor/craft-query-api) installed on your Craft CMS instance.

const app = createApp(App);
## Documentation

app.use(CraftCms, {
baseUrl: 'https://backend-craftcms.ddev.site',
debug: true,
registerComponents: true,
});
Visit the [Vue Craft CMS](https://samuelreichor.at/libraries/vue-craftcms) for all documentation, guides and developer resources.

app.mount('#app');
```

## Further Resources

- [Craft CMS Plugin](https://github.com/samuelreichor/craft-query-api)
- [Core JS Querybuilder](https://github.com/samuelreichor/js-craftcms-api)
- [Nuxt Craft](https://github.com/samuelreichor/nuxt-craft)
- [Craft CMS Plugin](https://github.com/samuelreichor/craft-query-api): A Craft CMS Plugin, that powers this great stuff.
- [Core JS Querybuilder](https://github.com/samuelreichor/js-craftcms-api): The core package, you can build wrappers around it to support your framework.
- [Nuxt Craft](https://github.com/samuelreichor/nuxt-craft): A package to use the query builder in Nuxt.

## Support

- Bugs or Feature Requests? [Submit an issue](/../../issues/new).

## Contributing

Contributions are welcome! <3
If you encounter bugs or have feature requests, [please submit an issue](/../../issues/new). Your feedback helps improve the library!

0 comments on commit 1915ea2

Please sign in to comment.