Class InstallationLayout
java.lang.Object
com.brunoritz.gradle.singularnode.platform.layout.InstallationLayout
- Direct Known Subclasses:
UnixInstallationLayout,WindowsInstallationLayout
Represents all relevant directories and binaries needed by the plugin. Any access to a file within the tooling
installation should be made via this class in order to compensate for different directory layouts on various
platforms.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstallationLayout(org.gradle.api.file.DirectoryProperty installBaseDir) -
Method Summary
Modifier and TypeMethodDescriptionabstract FileReturns the directory containing the NodeJS executable.Returns the directory within which NodeJS is installed.Returns the directory whiin which the managed version of NPM is installed.abstract FilepathOfBundledCliScript(String scriptName) Returns the full path of a bundled NPM CLI script.abstract FileReturns the full path to the bundled NPM script.abstract FileReturns the full path to the bundled NPX script.abstract FileReturns the full path to the NPM installation managed by this plugin.abstract FileReturns the full path to the PNPM installation managed by this plugin.abstract FileReturns the full path to the Yarn installation managed by this plugin.abstract FileReturns the full path of the executable representing the NodeJS engine.Returns the directory within which the managed version of PNPM is installed.Returns the directory whiin which the managed version of Yarn is installed.
-
Constructor Details
-
InstallationLayout
protected InstallationLayout(org.gradle.api.file.DirectoryProperty installBaseDir)
-
-
Method Details
-
nodeJsInstallDir
Returns the directory within which NodeJS is installed. The directoy is assumed to directly contain thebin,node_modulesand compantion directories without an intermediate directory representing the version of the installed tooling. -
npmInstallDirectory
Returns the directory whiin which the managed version of NPM is installed. The directory returned is the one used to install NPM into using the--prefixswitch. -
yarnInstallDirectory
Returns the directory whiin which the managed version of Yarn is installed. The directory returned is the one used to install Yarn into using the--prefixswitch. -
pnpmInstallDirectory
Returns the directory within which the managed version of PNPM is installed. The directory returned is the one used to install PNPM into using the--prefixswitch. -
nodeJsBinDirectory
Returns the directory containing the NodeJS executable. Not that this might not be a subdirectory of the installation directory, but just the installation directory itse.f -
pathOfNodeExecutable
Returns the full path of the executable representing the NodeJS engine. -
pathOfBundledNpmScript
Returns the full path to the bundled NPM script. Note that this is not the managed version and should only be used for installing the desired version of NPM. The file returned is (depending on the platform) just a symlink to the actual CLI script. -
pathOfBundnledNpxScript
Returns the full path to the bundled NPX script. Note that this is not the managed version and should only be used or installing the desired version of NPX. -
pathOfBundledCliScript
Returns the full path of a bundled NPM CLI script. Such files reside within thenode_modulesdirectory bundled with the NodeJS installation. The name of the script file itself is<scriptName>-cli.js.- Parameters:
scriptName- The script's name without thecli-jssuffix
-
pathOfManagedNpmScript
Returns the full path to the NPM installation managed by this plugin. This is the verison of PNPM to be used for all PNPM invocations except for installing the managed version itself. -
pathOfManagedYarnScript
Returns the full path to the Yarn installation managed by this plugin. This is the verison of Yarn to be used for all Yarn invocations except for installing the managed version itself. -
pathOfManagedPnpmScript
Returns the full path to the PNPM installation managed by this plugin. This is the verison of PNPM to be used for all PNPM invocations except for installing the managed version itself.
-