public class FrontendStubs extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FrontendStubs.Tool
Types of build tools.
|
static class |
FrontendStubs.ToolStubBuilder
Builds a new instance of
FrontendStubs.ToolStubInfo. |
static class |
FrontendStubs.ToolStubInfo
Holds an information about build tool to be stubbed.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
WEBPACK_SERVER |
static String |
WEBPACK_TEST_OUT_FILE |
| Modifier and Type | Method and Description |
|---|---|
static void |
createStubNode(boolean stubNode,
boolean stubNpm,
String baseDir)
Creates stub versions of `node` and `npm` in the ./node folder as
frontend-maven-plugin does.
|
static void |
createStubNode(FrontendStubs.ToolStubInfo stubNode,
FrontendStubs.ToolStubInfo stubNpm,
String baseDir)
Creates stub versions of `node` and `npm` in the ./node folder as
frontend-maven-plugin does.
|
static void |
createStubWebpackServer(String readyString,
int milliSecondsToRun,
String baseDir)
Creates a stub webpack-dev-server able to output a ready string, sleep
for a while and output arguments passed to a file, so as tests can check
it.
|
static void |
createStubWebpackServer(String readyString,
int milliSecondsToRun,
String baseDir,
boolean enableListening)
Creates a stub webpack-dev-server able to output a ready string, sleep
for a while and output arguments passed to a file, so as tests can check
it.
|
public static final String WEBPACK_SERVER
public static final String WEBPACK_TEST_OUT_FILE
public static void createStubNode(FrontendStubs.ToolStubInfo stubNode, FrontendStubs.ToolStubInfo stubNpm, String baseDir) throws IOException
stubNode - node stub information, including whether `node/node`
(`node/node.exe`) stub should be created, and what version
should it output if '-v' || '--version' flag are set.stubNpm - npm stub information, including whether
`node/node_modules/npm/bin/npm-cli` and `npx-cli` should be
created, and what version should it output if '-v' ||
'--version' flag are set.baseDir - parent to create `node` dir inIOException - when a file operation failspublic static void createStubNode(boolean stubNode,
boolean stubNpm,
String baseDir)
throws IOException
stubNode - whether `node/node` (`node/node.exe`) stub should be createdstubNpm - whether `node/node_modules/npm/bin/npm-cli` and `npx-cli`
should be createdbaseDir - parent to create `node` dir inIOException - when a file operation failspublic static void createStubWebpackServer(String readyString, int milliSecondsToRun, String baseDir, boolean enableListening) throws IOException
readyString - string to outputmilliSecondsToRun - time to keep the server runningbaseDir - parent directoryenableListening - enable listening to port passed via `--port`IOException - when a file operation failspublic static void createStubWebpackServer(String readyString, int milliSecondsToRun, String baseDir) throws IOException
readyString - string to outputmilliSecondsToRun - time to keep the server runningbaseDir - parent directoryIOException - when a file operation failsCopyright © 2000–2023 Vaadin Ltd. All rights reserved.