Class NpmInitializer
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.ext.nodejs.NpmInitializer
- All Implemented Interfaces:
Renamable, ResourceProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoProvide(ResourceRequest<T> request) Invoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.Set the new name.nodeJsVersion(String version) Sets the node.js version to use.Methods inherited from class AbstractProvider
context, name, of, rename, toString, vavrStreamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
of, resources
-
Constructor Details
-
NpmInitializer
Initializes a new NPM initializer.- Parameters:
project- the project
-
-
Method Details
-
name
-
nodeJsVersion
Sets the node.js version to use. Setting a version is mandatory.- Parameters:
version- the version- Returns:
- the npm executor
-
doProvide
Description copied from class:AbstractProviderInvoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
request- the request for resources- Returns:
- the stream
-