Package
Loads and activates a package's main module and resources like stylesheets, keymaps, and menus in Inkdrop.
onDidDeactivate(callback)
Package Deactivation Event Subscription
Invoke a callback function when all packages have been deactivated.
Parameters
- Name
callback()
- Type
- function
- Required
- Description
A function to be called when all packages have been deactivated.
Returns
A Disposable on which .dispose()
can be called to unsubscribe.
Event Subscription Example
const disposable = inkdrop.packages.onDidDeactivate(() => {
console.log('All packages have been deactivated');
});
// To unsubscribe
disposable.dispose();
isCompatible()
Native Module Compatibility Check
Determine if all native modules required by this package are correctly compiled against the current version of Inkdrop.
Incompatible packages cannot be activated.
Returns
A Boolean value: true
if compatible, false
if incompatible.
Compatibility Check Example
const isPackageCompatible = inkdrop.packages.isCompatible();
console.log('Is compatible:', isPackageCompatible);