Skip to content

Latest commit

 

History

History
executable file
·
35 lines (25 loc) · 830 Bytes

readme.md

File metadata and controls

executable file
·
35 lines (25 loc) · 830 Bytes

Swup Debug plugin

Debug plugin adds some useful functionality to the swup for development purposes. Mainly, it outputs all the events in a console as they happen, which can be useful for debugging.

Plugin also rewrites swups log method, so any output provided by plugins is also visible.

Plugin also tries to detect some common mistakes, and outputs a suggestions into a console.

Instalation

This plugin can be installed with npm

npm install @swup/debug-plugin

and included with import

import SwupDebugPlugin from '@swup/debug-plugin';

or included from the dist folder

<script src="./dist/SwupDebugPlugin.js"></script>

Usage

To run this plugin, include an instance in the swup options.

const swup = new Swup({
  plugins: [new SwupDebugPlugin()]
});