diff --git a/.changeset/twelve-wombats-joke.md b/.changeset/twelve-wombats-joke.md new file mode 100644 index 0000000..11ebeb9 --- /dev/null +++ b/.changeset/twelve-wombats-joke.md @@ -0,0 +1,5 @@ +--- +"nuxt-craftcms": patch +--- + +Update vue-craftcms and add new config option. Update Readme. diff --git a/README.md b/README.md index 711bec4..99c8173 100644 --- a/README.md +++ b/README.md @@ -11,48 +11,43 @@
> [!WARNING] > This npm package is still in production and important features may change. -## Quick Setup -Install the module to your Nuxt application with one command: +## Features + +- Easily build and execute queries directly from Nuxt. +- 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. -```bash -npx nuxi module add nuxt-craftcms -``` +## Requirements -Add a craftcms config to your `nuxt.config.js` and replace the baseUrl with your Craft CMS url. +This plugin requires Nuxt 3 and the [Craft Query API](https://github.com/samuelreichor/craft-query-api) installed on your Craft CMS instance. -```typescript -import { defineNuxtConfig } from 'nuxt'; +## Documentation -export default defineNuxtConfig({ - modules: ['nuxt-craftcms'], +Visit the [Nuxt Craft CMS](https://samuelreichor.at/libraries/nuxt-craftcms) for all documentation, guides and developer resources. - craftcms: { - baseUrl: 'https://backend-craftcms.ddev.site' - } -}); -``` ## Further Resources -- [Craft CMS Plugin](https://github.com/samuelreichor/craft-query-api) -- [Core JS Querybuilder](https://github.com/samuelreichor/js-craftcms-api) -- [Vue Craft](https://github.com/samuelreichor/vue-craftcms) +- [Craft Query API](https://github.com/samuelreichor/craft-query-api): A Craft CMS Plugin, that powers this great stuff. +- [JS Craft CMS API](https://github.com/samuelreichor/js-craftcms-api): The core package of the querybuilder. +- [Vue Craft CMS](https://github.com/samuelreichor/nuxt-craft): A package to use the query builder in Vue. ## 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! diff --git a/package-lock.json b/package-lock.json index 356ca70..6311503 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "nuxt-craftcms", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nuxt-craftcms", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "@nuxt/kit": "^3.13.2", - "vue-craftcms": "0.2.0" + "vue-craftcms": "0.2.1" }, "devDependencies": { "@changesets/cli": "^2.27.9", @@ -8455,9 +8455,9 @@ } }, "node_modules/js-craftcms-api": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/js-craftcms-api/-/js-craftcms-api-0.1.2.tgz", - "integrity": "sha512-6RCHdFkxso++y/vQhrNFtLyLQagYIXQRaVr/sIKlzBGrjAX9MxK5yDBKnU3TSgycQsYMRjq6CCjVgWnv3zrMhg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/js-craftcms-api/-/js-craftcms-api-0.1.4.tgz", + "integrity": "sha512-5/qpZalgsOoAt+njg1PNDzGSurJFYz3aOYVnA6S9jL4lK56HjDXa5GzkMk+HXitX2Wq32LSBHQtCa5SgbuB3RQ==", "license": "MIT" }, "node_modules/js-tokens": { @@ -15815,12 +15815,12 @@ } }, "node_modules/vue-craftcms": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/vue-craftcms/-/vue-craftcms-0.2.0.tgz", - "integrity": "sha512-QVUzXN0qLii7d96x/t5gj1J5xFEhROH/lajTZqN4QalDtEi7+5bd8abcIcU25vbvmo08ud1KuNMTnFB8RosDPg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vue-craftcms/-/vue-craftcms-0.2.1.tgz", + "integrity": "sha512-auKiB0OmcWXhPi0W3S65/Ix7Ww+Xzmcn3zFvsefKruWA/VQAfD2RxsrzlVlLIkJgDBAGcpLFM6sj9m2KUQiqUw==", "license": "MIT", "dependencies": { - "js-craftcms-api": "0.1.2", + "js-craftcms-api": "0.1.4", "vue": "^3.4.37" } }, diff --git a/package.json b/package.json index c0c6007..096cd66 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "@nuxt/kit": "^3.13.2", - "vue-craftcms": "0.2.0" + "vue-craftcms": "0.2.1" }, "devDependencies": { "@changesets/cli": "^2.27.9", diff --git a/src/module.ts b/src/module.ts index 6e46fa3..ec2935b 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,7 +1,7 @@ import { addPlugin, defineNuxtModule, addImportsDir, addComponent, createResolver } from '@nuxt/kit' -import type { CraftCmsOptions } from 'vue-craftcms' +import { defaultOptions, type CraftCmsOptions } from 'vue-craftcms' -export default defineNuxtModule