public static class NodeTasks.Builder extends Object implements Serializable
NodeExecutor instance.| Modifier and Type | Field and Description |
|---|---|
File |
generatedFolder
Directory where generated files are written.
|
File |
npmFolder
Directory for for npm and folders and files.
|
| Constructor and Description |
|---|
Builder(ClassFinder classFinder,
File npmFolder)
Create a builder instance given an specific npm folder.
|
Builder(ClassFinder classFinder,
File npmFolder,
File generatedPath)
Create a builder instance with custom npmFolder and generatedPath
|
Builder(ClassFinder classFinder,
File npmFolder,
File generatedPath,
File frontendDirectory)
Create a builder instance with all parameters.
|
| Modifier and Type | Method and Description |
|---|---|
NodeTasks |
build()
Creates a
NodeExecutor using this configuration. |
NodeTasks.Builder |
collectVisitedClasses(Set<String> visitedClasses)
Sets a set to which the names of classes visited when finding
dependencies will be collected.
|
NodeTasks.Builder |
createMissingPackageJson(boolean create)
Sets whether to create the package file if missing.
|
NodeTasks.Builder |
enableImportsUpdate(boolean enableImportsUpdate)
Sets whether to enable imports file update.
|
NodeTasks.Builder |
enablePackagesUpdate(boolean enablePackagesUpdate)
Sets whether to enable packages and webpack file updates.
|
NodeTasks.Builder |
runNpmInstall(boolean runNpmInstall)
Sets whether run
npm install after updating
dependencies. |
NodeTasks.Builder |
withEmbeddableWebComponents(boolean generateEmbeddableWebComponents)
Sets whether to collect and package
WebComponentExporter dependencies. |
NodeTasks.Builder |
withWebpack(File webpackOutputDirectory,
String webpackTemplate,
String webpackGeneratedTemplate)
Sets the webpack related properties.
|
public final File npmFolder
public final File generatedFolder
public Builder(ClassFinder classFinder, File npmFolder)
classFinder - a class findernpmFolder - folder with the `package.json` filepublic Builder(ClassFinder classFinder, File npmFolder, File generatedPath)
classFinder - a class findernpmFolder - folder with the `package.json` filegeneratedPath - folder where flow generated files will be placed.public Builder(ClassFinder classFinder, File npmFolder, File generatedPath, File frontendDirectory)
classFinder - a class findernpmFolder - folder with the `package.json` filegeneratedPath - folder where flow generated files will be placed.frontendDirectory - a directory with project's frontend filespublic NodeTasks build()
NodeExecutor using this configuration.NodeExecutor instancepublic NodeTasks.Builder withWebpack(File webpackOutputDirectory, String webpackTemplate, String webpackGeneratedTemplate)
webpackOutputDirectory - the directory to set for webpack to output its build
results.webpackTemplate - name of the webpack resource to be used as template when
creating the webpack.config.js file.webpackGeneratedTemplate - name of the webpack resource to be used as template when
creating the webpack.generated.js file.public NodeTasks.Builder enablePackagesUpdate(boolean enablePackagesUpdate)
true.enablePackagesUpdate - true to enable packages and webpack update,
otherwise falsepublic NodeTasks.Builder enableImportsUpdate(boolean enableImportsUpdate)
true.enableImportsUpdate - true to enable imports file update, otherwise
falsepublic NodeTasks.Builder runNpmInstall(boolean runNpmInstall)
npm install after updating
dependencies.runNpmInstall - run npm install. Default is truepublic NodeTasks.Builder withEmbeddableWebComponents(boolean generateEmbeddableWebComponents)
WebComponentExporter dependencies.generateEmbeddableWebComponents - collect dependencies. Default is truepublic NodeTasks.Builder createMissingPackageJson(boolean create)
create - create the packagepublic NodeTasks.Builder collectVisitedClasses(Set<String> visitedClasses)
visitedClasses - a set to collect class name to, or null to
not collect visited classesCopyright © 2000–2019 Vaadin Ltd. All rights reserved.