Interface JSBundleProcessor
public interface JSBundleProcessor
Processes an OSGi bundle to find NPM packages and modules inside it and make
them available for the
NPMRegistry to track them.
There can be several JSBundleProcessors deployed inside one portal if
necessary. This allows the deployment of OSGi bundles with different
structures containing the NPM packages.
By default, the portal is bundled with a default JSBundleProcessor
implemented by com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatNPMBundleProcessor,
which looks for NPM packages inside the
META-INF/resources/node_modules folder.
-
Method Summary
-
Method Details
-
process
Returns a JS Bundle filled with the description of the NPM packages or modules found in the given bundle. If the given bundle does not contain an NPM package or module, this method returnsnull.This method is invoked by the
NPMRegistrywhenever a new OSGi bundle is deployed to the portal.- Parameters:
bundle- the handle to the OSGi bundle being deployed- Returns:
- the valid bundle descriptor or
nullif no NPM packages or modules were found
-