com.vaadin.flow.server.frontend.
Class NodeUpdater
- java.lang.Object
-
- com.vaadin.flow.server.frontend.NodeUpdater
-
All Implemented Interfaces:
Direct Known Subclasses:
TaskCreatePackageJson, TaskUpdateImports, TaskUpdatePackages
public abstract class NodeUpdater extends Object implements FallibleCommand
Base abstract class for frontend updaters that needs to be run when in dev-mode or from the flow maven plugin.
Since:
2.0
See Also:
-
-
Field Summary
Fields Modifier and Type Field and Description protected static String
DEP_NAME_FLOW_DEPS
protected FrontendDependenciesScanner
frontDeps
The
FrontendDependencies
object representing the application dependencies.protected File
generatedFolder
Base directory for flow generated files.
protected File
nodeModulesFolder
The path to the
FrontendUtils.NODE_MODULES
directory.protected File
npmFolder
Base directory for
Constants.PACKAGE_JSON
,FrontendUtils.WEBPACK_CONFIG
,FrontendUtils.NODE_MODULES
.
-
Constructor Summary
Constructors Modifier Constructor and Description protected
NodeUpdater(ClassFinder finder, FrontendDependenciesScanner frontendDependencies, File npmFolder, File generatedPath)
Constructor.
-
Method Summary
All Methods Modifier and Type Method and Description protected String
resolveResource(String importPath, boolean isJsModule)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.server.FallibleCommand
execute
-
-
-
-
Field Detail
-
DEP_NAME_FLOW_DEPS
protected static final String DEP_NAME_FLOW_DEPS
See Also:
-
npmFolder
protected final File npmFolder
Base directory for
Constants.PACKAGE_JSON
,FrontendUtils.WEBPACK_CONFIG
,FrontendUtils.NODE_MODULES
.
-
nodeModulesFolder
protected final File nodeModulesFolder
The path to the
FrontendUtils.NODE_MODULES
directory.
-
generatedFolder
protected final File generatedFolder
Base directory for flow generated files.
-
frontDeps
protected final FrontendDependenciesScanner frontDeps
The
FrontendDependencies
object representing the application dependencies.
-
-
Constructor Detail
-
NodeUpdater
protected NodeUpdater(ClassFinder finder, FrontendDependenciesScanner frontendDependencies, File npmFolder, File generatedPath)
Constructor.
Parameters:
finder
- a reusable class finderfrontendDependencies
- a reusable frontend dependenciesnpmFolder
- folder with the `package.json` filegeneratedPath
- folder where flow generated files will be placed.
-
-