Skip to content

V3 Miscellaneous

Neodymium edited this page Apr 29, 2023 · 1 revision

BundleBD also includes all of the following miscellaneous features and utilities.

meta

The meta module contains the plugin's metadata from the Plugin Configuration file.

import meta from "meta";

console.log(meta.name, meta.author, meta.version); // Logs the plugin's name, author, and version.

styles

The styles module exports a function that allows you to access all of the imported styles from every file in your plugin.

import styles from "styles";

console.log(styles()); // Logs the processed contents of every stylesheet imported throughout all of your plugin's files.

It also contains some shortcut functions to easily inject and remove basic styles.

import { addStyles, removeStyles } from "styles";

addStyles(); // Equivalent to DOM.addStyle(styles())

removeStyles(); // Equivalent to DOM.removeStyle()