New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sempro/nuxt-prismic

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sempro/nuxt-prismic

Nuxt plugin for injecting and transforming the Prismic REST API

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by40%
Maintainers
3
Weekly downloads
 
Created
Source

nuxt-prismic

Nuxt plugin for injecting and transforming the Prismic REST API

Build Status eslint

Installation

Install with NPM
npm install @sempro/nuxt-prismic --save
Add to nuxt.config.js
modules: [
  '@sempro/nuxt-prismic',
],

API

app.$prismic.api

Instantiated api endpoint

app.$prismic.experimentCookie

Experiment cookie exposed from prismic-javascript

app.$prismic.previewCookie

Preview cookie exposed from prismic-javascript

app.$prismic.predicates

Prismic Predicates. Read more here, Query Predicates Reference in Javascript and Use Multiple Predicates in Javascript

Usage

Example Vue component
<template>
  <div>
    <h1>{{ post.title }}</h1>
  </div>
</template>

<script>
  export default {
    async asyncData({ app }) {
      const post = await app.$prismic.api.getByID('PRISMIC-DOCUMENT-ID');

      return { post };
    },
  };
</script>

Testing

# Unit tests
npm t

# Code style
npm run eslint

FAQs

Package last updated on 29 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc