Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1160 Property to select node path. #1165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ to see how it should be set up: https://github.com/eirslett/frontend-maven-plugi
- [Ignoring Failure](#ignoring-failure)
- [Skipping Execution](#skipping-execution)


**Recommendation:** _Try to run all your tasks via npm scripts instead of running bower, grunt, gulp etc. directly._

### Installing node and npm
Expand All @@ -83,6 +84,7 @@ The versions of Node and npm are downloaded from https://nodejs.org/dist, extrac
in your [installation directory](#installation-directory) . Node/npm will only be "installed" locally to your project.
It will not be installed globally on the whole system (and it will not interfere with any Node/npm installations already
present).
If you want to use the existing Node in your system, simply add a `nodeExecutablePath` points to the existed node executable.

```xml
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public InstallNodeExecutorConfig(InstallConfig installConfig) {

@Override
public File getNodePath() {
String nodePath = System.getProperty("nodeExecutablePath");
if (nodePath != null) {
return new File(nodePath);
}

String nodeExecutable = getPlatform().isWindows() ? NODE_WINDOWS : NODE_DEFAULT;
return new File(installConfig.getInstallDirectory() + nodeExecutable);
}
Expand Down