diff --git a/build/_bower.shade b/build/_bower.shade index 515cea44b9..e9419165ff 100644 --- a/build/_bower.shade +++ b/build/_bower.shade @@ -1,8 +1,8 @@ default currentDir = '${Directory.GetCurrentDirectory()}' default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}' -var bowerGloballyInstalled = '${TestCommand("bower", "--version")}' var bowerInstalled = '${Directory.Exists(Path.Combine(nodeDir, "node_modules", "bower"))}' +var bowerGloballyInstalled = '${ !bowerInstalled && TestCommand("bower", "--version") }' var bowerCmd = '${ bowerGloballyInstalled ? "bower" : Path.Combine(nodeDir, "node_modules", "bower", "bin", "bower") }' - // Install bower locally if not already installed either globally or locally diff --git a/build/_grunt.shade b/build/_grunt.shade index c2e9f8b257..65d8ff4b4e 100644 --- a/build/_grunt.shade +++ b/build/_grunt.shade @@ -1,8 +1,8 @@ default currentDir = '${Directory.GetCurrentDirectory()}' default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}' -var gruntCliGloballyInstalled = '${TestCommand("grunt", "--version")}' var gruntCliInstalled = '${Directory.Exists(Path.Combine(nodeDir, "node_modules", "grunt-cli"))}' +var gruntCliGloballyInstalled = '${ !gruntCliInstalled && TestCommand("grunt", "--version") }' var gruntCmd = '${ gruntCliGloballyInstalled ? "grunt" : Path.Combine(nodeDir, "node_modules", "grunt-cli") }' -// Install grunt-cli locally diff --git a/build/_node-install.shade b/build/_node-install.shade index 94359bb84f..eb8d8051fd 100644 --- a/build/_node-install.shade +++ b/build/_node-install.shade @@ -10,7 +10,7 @@ default nodeVer = '0.10.28' default npmVer = '1.4.9' default nodeExeSha = '628FFD6C3577068C00CEC9F6F897F0EC8F5212D9' default nodeInstallDir = '${Path.Combine(binDir, "nodejs")}' -default nodeGloballyInstalled = '${TestCommand("node" , "--version")}' +default nodeGloballyInstalled = '${ !Directory.Exists(nodeInstallDir) && TestCommand("node" , "--version") }' var nodeExe = 'node.exe' var npmZip = 'npm-${npmVer}.zip' diff --git a/build/_node.shade b/build/_node.shade index acfb908850..1247873e75 100644 --- a/build/_node.shade +++ b/build/_node.shade @@ -1,8 +1,9 @@ default currentDir = '${Directory.GetCurrentDirectory()}' default nodeDir = '${Path.Combine(currentDir, "bin", "node")}' -default nodeGloballyInstalled = '${TestCommand("node", "--version")}' - -var nodeExePath = '${ nodeGloballyInstalled ? "node" : Path.Combine(nodeDir, "node.exe") }' node-install once='installNode' + +var nodeExeFile = '${ Path.Combine(nodeDir, "node.exe") }' +var nodeExePath = '${ File.Exists(nodeExeFile) ? nodeExeFile : "node" }' + exec program='${nodeExePath}' commandline='${nodeCommand}' \ No newline at end of file diff --git a/build/_npm.shade b/build/_npm.shade index df094054b5..8f885cc5cf 100644 --- a/build/_npm.shade +++ b/build/_npm.shade @@ -2,9 +2,10 @@ default currentDir = '${Directory.GetCurrentDirectory()}' default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}' default npmDir = '${currentDir}' -var npmGloballyInstalled = '${TestCommand("npm" , "--version")}' -var npmCmd = '${ npmGloballyInstalled ? "npm" : Path.Combine(nodeDir, "npm.cmd") }' - node-install once='installNode' + +var npmFile = '${ Path.Combine(nodeDir, "npm.cmd") }' +var npmCmd = '${ File.Exists(npmFile) ? npmFile : "npm" }' + exec program='cmd' commandline='/C ${npmCmd} ${npmCommand}' workingdir='${npmDir}' if='!IsLinux' -exec program='${npmCmd}' commandline='${npmCommand}' workingdir='${npmDir}' if='IsLinux' +exec program='${npmCmd}' commandline='${npmCommand}' workingdir='${npmDir}' if='IsLinux' \ No newline at end of file