Skip to content

V4 Miscellaneous

Neodymium edited this page Dec 10, 2024 · 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 { name, author, version } from "meta";

console.log(name, author, 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()