Skip to content

rezozero/intervention-request-provider

Repository files navigation

intervention-request-provider

InterventionRequest provider for @nuxt/image

This is a Nuxt 3 module.

Installation

npm install --save-dev @rezo-zero/intervention-request-provider @nuxt/image
  • Register Nuxt module @rezo-zero/intervention-request-provider and @nuxt/image:
// nuxt.config.ts
modules: [
    '@rezo-zero/intervention-request-provider',
    '@nuxt/image'
]

Note

@rezo-zero/intervention-request-provider extends the Nuxt Image configuration.
Therefore it must be registered before @nuxt/image.

Setup

baseUrl

  • As a runtime config variable (preferred)
#.env
NUXT_PUBLIC_INTERVENTION_REQUEST_BASE_URL=https://example.com/assets
  • As a @nuxt/image provider option
    // nuxt.config.ts
    image: {
        providers: {
            interventionRequest: {
                options: {
                    baseUrl: 'http://localhost'
                }
            }
        }
    }

noProcessBaseUrl

  • As a runtime config variable (preferred)
#.env
NUXT_PUBLIC_INTERVENTION_REQUEST_NO_PROCESS_BASE_URL=https://example.com/assets
  • As a @nuxt/image provider option
    // nuxt.config.ts
    image: {
        providers: {
            interventionRequest: {
                options: {
                    noProcessBaseUrl: 'https://example.com/images'
                }
            }
        }
    }
  • As a runtime config variable (preferred)
#.env
NUXT_PUBLIC_INTERVENTION_REQUEST_IMAGES_PATH=images
    // nuxt.config.ts
    image: {
        providers: {
            interventionRequest: {
                options: {
                    imagesPath: 'images'
                }
            }
        }
    }

Operations available

See InterventionRequest operations

Contributing

  1. Clone this repository
  2. Install dependencies using npm install
  3. Start Docker server (InterventionRequest) using docker-compose up -d
  4. Start development server using npm run dev

Publishing

npm run release