Package

Description

Loads and activates a package's main module and resources such as stylesheets, keymaps, grammar, editor properties, and menus.

API documentation

Event Subscription

::onDidDeactivate(callback)

Invoke the given callback when all packages have been activated.

Argument Description
callback

Function

Return values
  • Returns a Disposable on which .dispose() can be called to unsubscribe.

Native Module Compatibility

::isCompatible()

Are all native modules depended on by this package correctly compiled against the current version of Pulsar?

Incompatible packages cannot be activated.

Return values
  • Returns a Boolean, true if compatible, false if incompatible.

::rebuild()

Rebuild native modules in this package's dependencies for the current version of Pulsar.

Return values
  • Returns a Promise that resolves with an object containing code, stdout, and stderr properties based on the results of running pulsar -p rebuild on the package.

::getBuildFailureOutput()

If a previous rebuild failed, get the contents of stderr.

Return values
  • Returns a String or null if no previous build failure occurred.