Class JSPackageDependency

java.lang.Object
com.liferay.frontend.js.loader.modules.extender.npm.JSPackageDependency

public class JSPackageDependency extends Object
Represents an NPM package dependency (i.e., another NPM package).
  • Constructor Details

    • JSPackageDependency

      public JSPackageDependency(JSPackage jsPackage, String packageName, String versionConstraints)
      Constructs a JSPackageDependency with the JS package, package name, and version constraints.
      Parameters:
      jsPackage - the package declaring the dependency
      packageName - the dependency's package name
      versionConstraints - the NPM semantic version expression defining the suitable versions for the dependency
  • Method Details

    • getJSPackage

      public JSPackage getJSPackage()
      Returns the NPM package declaring the dependency.
      Returns:
      the NPM package
    • getPackageName

      public String getPackageName()
      Returns the dependency's package name.
      Returns:
      the dependency's package name
    • getVersionConstraints

      public String getVersionConstraints()
      Returns the NPM semantic version expression defining the suitable versions for the dependency.
      Returns:
      the NPM semantic version expression