@datocms/nuxt-module
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

DatoCMS Nuxt Module

npm version npm downloads License

A Nuxt.js module that helps you to work faster with DatoCMS with Nuxt.

Features

This module makes components and composables from vue-datocms easily available in Nuxt.

This module takes care of authentication for you: once the module is installed and properly configured, you're free to use components and composables without worrying about the token. Refer to vue-datocms documentation for usage.

Components:

Composables:

Setup

  1. Add @datocms/nuxt-module dependency to your project
npm install @datocms/nuxt-module # or yarn add @datocms/nuxt-module
  1. Add @datocms/nuxt-module to the modules section of nuxt.config.js
export default {
  modules: [
    // Simple usage
    '@datocms/nuxt-module',

    // With options
    ['@datocms/nuxt-module', { /* module options */ }]
  ]
}

Using top level options

export default {
  modules: [
    '@datocms/nuxt-module'
  ],
  /* DatoCMS module options */
  datocms: {
    /* The token is mandatory: you find the token in the settings of your DatoCMS project */
    datocmsReadOnlyToken: 'YOUR TOKEN',
  }
}

Options

token

  • Type: String
  • Default: process.env.NUXT_ENV_DATOCMS_API_TOKEN

environment

  • Type: String
  • Default: process.env.NUXT_ENV_DATOCMS_ENVIRONMENT

endpoint

  • Type: String
  • Default: https://graphql.datocms.com

Development

  • Run npm run dev:prepare to generate type stubs.
  • Use npm run dev to start playground in development mode.

License

MIT License

Copyright (c) - DatoCMS

Readme

Keywords

none

Package Sidebar

Install

npm i @datocms/nuxt-module

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

9.07 kB

Total Files

11

Last publish

Collaborators

  • sistrall_
  • marcelofinamorvieira
  • stefanoverna
  • delphaber
  • mat_jack1
  • souljuse