default currentDir = '${Directory.GetCurrentDirectory()}' default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}' var gruntCliLibrary = '${ Path.Combine(nodeDir, "node_modules", "grunt-cli", "bin", "grunt") }' var gruntCliInstalled = '${ File.Exists(gruntCliLibrary) }' default gruntCliGloballyInstalled = '${ !gruntCliInstalled && TestCommand("grunt", "--version") }' var gruntCmd = '${ gruntCliGloballyInstalled ? "grunt" : gruntCliLibrary }' - // Install grunt-cli locally if not already installed either globally or locally; creates gruntCliLibrary file if run npm npmCommand='install ${E("npm_install_options")} --prefix "${nodeDir}" grunt-cli' if='!(gruntCliGloballyInstalled || gruntCliInstalled)' once='installGruntCli' -// Run grunt-cli exec program='cmd' commandline='/C ${gruntCmd}' workingdir='${gruntDir}' if='gruntCliGloballyInstalled && !IsLinux' exec program='${gruntCmd}' workingdir='${gruntDir}' if='gruntCliGloballyInstalled && IsLinux' node nodeCommand='"${gruntCmd}"' workingdir='${gruntDir}' if='!gruntCliGloballyInstalled'