JSPM

  • Created
  • Published
  • Downloads 147
  • Score
    100M100P100Q113844F
  • License MIT

Module to get setting from WooNuxt Settings plugin installed on WordPress

Package Exports

  • woonuxt-settings

Readme

My Module

npm version npm downloads License

My new Nuxt module

Features

  • Adds the following enviorment variables:
    • PRIMARY_COLOR - The primary color of the site
    • PUBLIC_INTROSPECTION_ENABLED - Whether or not the GraphQL API is publicly available
    • PUBLIC_GRAPHQL_ENDPOINT - The publicly available GraphQL endpoint
    • LOGO - The logo of the site
    • PRODUCTS_PER_PAGE - The number of products to show per page
    • GLOBAL_PRODUCT_ATTRIBUTES - The global product attributes (This is used for filtering products)
    • MAX_PRICE - The most expensive product price
    • FRONT_END_URL - The URL of the front end (This is used for the checkout redirect)
    • STRIPE_PUBLISHABLE_KEY - The Stripe publishable key

Quick Setup

  1. Add woonuxt-settings dependency to your project
# Using pnpm
pnpm add -D woonuxt-settings

# Using yarn
yarn add --dev woonuxt-settings

# Using npm
npm install --save-dev woonuxt-settings
  1. Add woonuxt-settings to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["woonuxt-settings"],
});

That's it! You can now use My Module in your Nuxt app ✨

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release